Austin Kearns chipped in with four hits and two RBIs. It was his fourth career four-hit game, with his last one coming on May 10, 2006, against the Nationals. Kearns added a two-out RBI single in the seventh.
Buehrle (4-4) gave the Marlins 7 2/3 innings, allowing five hits (one after the first inning) and he exited to a standing ovation after 111 pitches. Heath Bell closed out the ninth for his second save in as many days and sixth overall in 10 chances.
Seeing Buehrle overcome adversity is nothing new for Marlins manager Ozzie Guillen.
"I know Mark Buehrle very well," said Guillen, who managed the left-hander with the White Sox. "When you talk about bulldogs and you talk about gamers, there are a lot of fakes out there. There are a lot of fake bulldogs. This kid's for real. I've seen him turn around games like that. One bad inning, keep pitching. He's not a selfish player."
The Marlins improved to four games over .500 for the first time since June 6, 2011. They are 15-5 in May.
"We're playing as a team," Bell said. "We're doing the little things. It's really nice. That's how you win games."
The Marlins knocked the 49-year-old Moyer out of the game with their five-run fourth. The left-hander was charged with six runs in 3 2/3 innings, and he threw 100 pitches.
Stanton's grand slam was his second of the season and fourth of his career. The slugger, who has nine homers on the season, connected on a walk-off grand slam to beat the Mets on May 13.
Moyer broke in as a rookie in 1986, three years before Stanton was born. The showdown went to a full count, after a close 2-2 pitch was called a ball by home-plate umpire Ted Barrett.
"It was close," Stanton said. "But that's what he works off of. He works that little bit off the plate. It's close enough where you're like, 'Ah.' But that's when you get out of yourself. I didn't think it was a strike, so I didn't swing."
Moyer brushed off the borderline pitch as part of the breaks of baseball.
"Don't get calls, but I get the ball back and it is what it is," the lefty said. "I'm not going to gripe about it. I'm not going to complain about it. That's this game; it's all a judgment game, whether it's coming from the umpire's standpoint, a pitcher's standpoint, a catcher's standpoint, a hitter's standpoint -- it's all about judgment and we all react to what we see, what we feel and when it doesn't necessarily go your way, you got to regroup and make another pitch."
Miami stormed back from four down, and powered by Stanton's slam, scored five runs in the fourth to take a 6-4 lead.
Buehrle got the rally going with his second career double, a liner off the wall in right field. Jose Reyes singled to center, and Buehrle raced home when center fielder Dexter Fowler bobbled the ball for an error.
With two outs, Moyer walked Hanley Ramirez and Austin Kearns, loading the bases. Stanton faced a full count when he turned on a 72-mph changeup. It was a no-doubt blast, with the only question being if the ball would stay fair. It did, smashing into the auxiliary, video scoreboard. The impact of the drive knocked out several panels of lights, as well as gave Miami the lead.
But the new board was down only an inning or two. The system was reset, and the scoreboard was back in working order.
"Maybe the farthest, I don't know about the hardest," said Stanton of the drive estimated at 438 feet. "I cannot hear it. Everyone says it is a different sound. But it's normal to me. I don't see a difference."
The Rockies rocked Buehrle for four runs in the first inning. The damage came over a 14-pitch span, which started when Jordan Pacheco reached on an infield single that deflected off the veteran pitcher's right foot.
Shaken up, Buehrle was tended to by Guillen and trainer Sean Cunningham. During the visit, Guillen poked fun at his starter, who was a Gold Glove Award winner in the American League, but he looked awkward trying to recover on the play.
"I went out to the mound and I said, 'Gold Glove, my [bleep],' " Guillen joked. "He told me he was more embarrassed than hurt."
Colorado kept the pressure on as Carlos Gonzalez singled. The Rockies grabbed the lead on Michael Cuddyer's two-run double off the left-field wall. The big blow came when Troy Tulowitzki blasted a changeup for a two-run homer, estimated at 403 feet, to left.
In a 14-pitch span, Buehrle allowed four runs on four straight hits. Tulowitzki's homer was the last hit Buehrle allowed until Pacheco singled with one out in the eighth.
"To be honest with you, there were a couple of pitches I made mistakes on and they popped out," Buehrle said of his recovery. "That's why I say this game is so frustrating. You make good pitches and they get hits, and you make bad pitches and sometimes they make you pay for them, and other times, they don't."