The 26-year-old had thrown 75 pitches in the Cards' 4-3 loss and was trailing 3-1 when he made a pitch and winced. After a visit to the mound, he left the game.
Wacha exited the game in the bottom of the fourth. He gave up three runs, one earned, in 3⅔ innings. He'll have an MRI on Thursday.
"Feeling a little bit better," Wacha said. "I'm hoping for the best."
Wacha is 8-2 this season with a 3.20 ERA in 15 starts. His win percentage is the best in the league. He was coming off a four-inning stint against the Cubs on June 15 in which he gave up eight earned runs.
The Phillies won Wednesday's game 4-3. Wacha got a no-decision.
The Associated Press contributed to this report.