Cobb started Game 1 of the team's doubleheader against the Mets in New York on Tuesday.
The veteran right-hander allowed four runs (three earned) on six hits before leaving in the fifth with the injury. The Giants announced the move to IL after the 5-4 Game 1 loss.
Manager Gabe Kapler said Cobb would get an MRI, but Cobb said he was hopeful for a quick return.
"That was a brutal game for us,'' Cobb said. "Having two nine-inning doubleheaders, and then the starter coming out as early as I did, is putting the team in a bad position.''
Reliever Yunior Marte replaced Cobb on the roster.
Information from The Associated Press was used in this report.