Ramirez and Jeremy Hermida had RBI singles in Florida's five-run sixth and the Marlins rallied to beat the Brewers 7-4 on Monday night.
Jorge Cantu had two RBIs for Florida. Ramirez finished with three hits.
Eleven Marlins batted in the sixth, with the first eight reaching base safely. Jorge Julio (1-1) faced six batters and allowed five runs, four earned.
Julio hit two, including one with the bases loaded. Cody Ross scampered home when first baseman Prince Fielder committed an error on Emilio Bonifacio's grounder and Todd Coffey walked Dan Uggla to force in another run in the wild inning.
"It happens sometimes on the major league level, it really does," Marlins manager Fredi Gonzalez said. "I'm glad we were on the end of scoring runs."
Ramirez followed Fielder's error with an infield single to tie it at 4. After Jorge Cantu was hit by a pitch with the bases loaded, Hermida singled to left off Coffey.
"I was trying to get a groundball from Bonifacio for a double play but no luck -- that happens," Julio said.
Brewers manager Ken Macha said his team was short-handed in the bullpen, with relievers Mark DeFelice and Seth McClung unavailable.
"We needed one inning to get to Coffey and [Carlos] Villanueva and we couldn't get it out of Julio," Macha said.
Following the game, Martinez was optioned to Double-A Jacksonville.
"He did a great job tonight, so you pat him on the back and tell him he'll be back soon," Marlins starter Andrew Miller said.
Casey McGehee and Jason Kendall each had two hits and an RBI for Milwaukee, which led 4-2 after five innings. Jeff Suppan, who drove in a run with a bases-loaded walk in the Brewers' three-run second, allowed two runs and seven hits in five innings.
"If I go out thinking I have to pitch seven or eight innings, that would take me out of my focus," Suppan said. "My goal is to go out and make the pitches that I have to make to stay in the game."
Milwaukee center fielder Mike Cameron departed in the fifth inning with left knee irritation.
Miller gave up four runs, three earned, and six hits in 4 1/3 innings for the Marlins.
The Marlins also optioned C Brett Hayes to Triple-A Albuquerque. Florida plans to activate RHP Anibal Sanchez (right shoulder sprain) to start Tuesday night's game. Sanchez was 1-4 with a 5.79 ERA before going on the disabled list May 8. ... The Brewers entered with their best record (30-20) after the first 50 games in franchise history. The previous best was 29-21 in 1981. ... Florida 3B-1B Wes Helms (viral infection) was unavailable.