"It was not that bad of a pitch, but it was in the zone," Brewers manager Ron Roenicke said. "If you throw him a slider, you have to throw it out of the zone. You're in a tough spot where you have to make pitches, and if you make a mistake, that can happen."
After Juan Pierre gave the Marlins life with a one-out single in the eighth, Stanton crushed a Jim Henderson slider over the left-field fence for a two-run homer.
"It was all set up there," Marlins manager Mike Redmond said. "JP with that great at-bat, giving the big boy a chance to get up there and make that great swing and win the game."
Henderson threw just one pitch to Stanton, and the right-hander could tell it was exactly what the powerful 23-year-old was looking for.
"You could tell from the swing that he was sitting on the slider, and he got it where he wanted it, too," Henderson said. "It wasn't down."
Miami's bats delivered late in the game after rallying early against Brewers starter Wily Peralta. The Marlins struck first, putting together five consecutive hits before Peralta recorded an out in the second inning.
Logan Morrison doubled home Marcell Ozuna to get the scoring started, and Derek Dietrich followed with a two-run shot into the upper deck in right field that put Miami ahead, 3-0.
"Overall, I felt pretty good," Peralta said. "That second inning, they were aggressive, and I left a couple pitches up in the zone. After that, I was able to locate my slider and my fastball better."
Peralta would settle down following the rough second inning. The right-hander did not give up a hit over the next four innings, allowing just one runner to reach base when he walked Dietrich in the fourth. Peralta finished the night allowing three runs on five hits over six innings.
"I thought he did a nice job coming back," Roenicke said. "He kept us in the game enough where we got a lead. He did his job, and that's what you want to see. Sometimes he is going to scuffle, but he is still out there putting up zeros for you."
While Peralta got into a groove on the mound, the Brewers battled back at the plate.
They took advantage of some Marlins defensive miscues to get their offense going in the fourth. Carlos Gomez reached base after striking out on a wild pitch, and he advanced to third when Marlins starter Jacob Turner made an errant pickoff throw to first. Gomez would score on a Jonathan Lucroy sacrifice fly to bring Milwaukee within two.
The Brew Crew added a run in the sixth when Jean Segura scored on an Aramis Ramirez groundout. Segura, who had two hits and two stolen bases on the night, crossed home plate to cut the Marlins' lead in half.
The Brewers tied the game in the seventh when Yuniesky Betancourt tripled home Rickie Weeks to even the score at three and take Peralta off the hook for a loss.
"These guys got some weapons," Redmond said. "I mean, they got speed. They got guys that can put the ball in play and put some pressure on you."
But Milwaukee was not done yet. Roenicke pinch-hit for Peralta, sending Scooter Gennett to the plate, and the 23-year-old delivered, bunting home Betancourt to give the Brewers their first lead of the night against Turner.
"Offensively, we battled," Roenicke said. "That guy is pretty good. He's got a good fastball and good slider, but we did a nice job battling to get guys on base."
The one-run lead would not last long, as Stanton crushed a two-run homer off Henderson to put the Marlins back on top for good. The right-hander was unhappy with the result, especially after seeing how Peralta and his teammates climbed out of a three-run hole.
"It was fantastic with him bouncing back after the three-run second," Henderson said. "He was really attacking the hitters. Sixty pitches through six is fantastic. It's tough to see me get a loss and not him get a win after that."
David Villavicencio is a contributor to MLB.com.
This story was not subject to the approval of Major League Baseball or its clubs.