Manager Jayce Tingler said Lamet will get an MRI and is considered day-to-day.
Lamet appeared to be pitching well against the Milwaukee Brewers, striking out four after a single to start the game. He threw 19 strikes out of 29 pitches, reaching 97 mph on his fastball.
The Brewers won 4-2.
"He was feeling good, but it began tightening up on him in the second inning," Tingler said. "His fastball was salty today. Through all that he's been through, it's really the first setback of any kind he's had. But it's hard to simulate the adrenaline of an actual game. We'll have more info in a couple of days, but hopefully he can continue to pitch. It's day-to-day.''
Lamet, 28, had not pitched since leaving his final start of 2020 with elbow discomfort and missing the playoffs. He received multiple opinions that surgery wasn't needed and underwent platelet-rich plasma therapy in the offseason.
Lamet had Tommy John surgery in 2018 and didn't return until the second half of 2019.
Lamet was 3-1 in 12 starts last year, when he finished fourth in balloting for the National League Cy Young Award. He averaged 12.1 strikeouts per game and had a 2.09 ERA, third best in the NL.
His quick exit came a day after left-hander Adrian Morejon had Tommy John surgery.
The Associated Press contributed to this report.