Stanton rapped the ball into left field and brought Gorkys Hernandez in from third to break a 5-5 tie and cap a rally that brought the Marlins back from a 5-0 hole in the first inning.
Chad Gaudin (2-1) was credited with the win after pitching a scoreless ninth inning. Steve Cishek closed out the game for his 10th save.
Stanton finished the game with three hits, as did Donovan Solano who notched a pair of RBI as well.
Justin Upton drove in two runs with a single in Arizona's five-run first inning and also scored a run in the frame.
Sam Demel (0-1) took the loss for the Diamondbacks after pitching the 10th. Matt Albers was given a blown save after working just 2/3 of an inning in the three-run Miami sixth.