Ricky Nolasco (2-2) gave up three runs in seven innings and retired the final 15 batters he faced. The Marlins improved to 6-19, still worst in the majors, and 3-10 at home.
They benefited from a rare offensive outburst, scoring more than three runs for only the fifth time this season and twice coming from behind.
Stanton led the way, showing further signs he has shaken a prolonged slump to start the season. Last year's NL slugging leader waited 65 at-bats to hit his first homer Saturday, then hit another in the first inning off Carlos Villanueva to put Miami ahead 2-1.
Stanton singled home a run and later scored in the sixth. He homered again leading off in the eighth against Kameron Loe and finished 3 for 3 to raise his average to .243.
Stanton had been 0 for 4 with four strikeouts previously against Loe. The multihomer game was his seventh.
Nick Green added his first home run since 2009.
Nolasco fell behind 3-2 when he permitted the first four batters to reach in the third inning, then didn't allow another baserunner. He improved to 5-2 against the team that drafted him in 2001.
Chicago's Dioner Navarro homered in the ninth off Steve Cishek, who nonetheless earned his third save in four chances.
Villanueva (1-1) allowed four runs in six innings, raising his ERA to 2.29.
he Cubs' poor hitting with runners in scoring position persisted. They went 1 for 8 in those situations. Chicago, last in the NL Central, heads home after going 4-6 on a three-city trip.
Stanton's first-inning homer was the only hit allowed by Villanueva until the sixth, when Juan Pierre singled with one out and stole second. Stanton hit an RBI single and took second on the throw home, then scored on a two-out single by Donovan Solano that put Miami ahead to stay, 4-3.
Green drove in his first run this season with a homer off Loe in the seventh.
Anthony Rizzo's double off the wall scored David DeJesus from first base in the Cubs' first. Villanueva and DeJesus singled to start the third, and Starlin Castro followed with a two-run double that gave Chicago a 3-2 lead.
NOTES: Marlins 1B Joe Mahoney sat out and is day to day with a tight right hamstring. ... SS Castro made a diving catch of Solano's liner to end the first inning. ... Beginning Monday against San Diego, the Cubs play 16 of their next 19 games at home. ... The Marlins improved to 82-81 against the Cubs.