The 25-year-old is listed as day-to-day.
Manager Fredi Gonzalez said he's hopeful Ramirez will be back in the lineup Monday night for the series opener at San Francisco.
Ramirez, who entered Sunday leading the National League in hitting with a .346 average, has been dealing with a tight right groin for about a month. The discomfort moved into his hip area, and he tweaked the area in Saturday night's 5-3 Marlins victory over the Pirates after rounding first base on a single in the third inning.
"Hopefully, it's just today," said Gonzalez, who didn't rule out pinch-hitting Ramirez on Sunday. "We had a night game yesterday and a day game today. Maybe [Monday] he will be good to go."
Ramirez has been on a tear of late. He's driven in 26 runs in his past 12 games.
For the week of June 29, Ramirez was named co-Player of the Week in the NL along with San Diego's Chad Gaudin.
From June 21-July 1, Ramirez had a 10-game streak of driving in at least one run, the most by an NL shortstop. The streak, during which he drove in 24 runs, is also a team record.
Replacing Ramirez at shortstop Sunday was Emilio Bonifacio, and Wes Helms opened the day at third base. Dan Uggla batted third in Ramirez's normal spot.
Joe Frisaro is a reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.