The Braves, who lead the NL in come-from-behind wins, overcame deficits of 3-1 and 4-3.
Pitchers for the two teams combined to retire 30 consecutive batters Monday, when Atlanta won 7-1 in 14 innings. But the second game of the series was a slugfest, with Upton leading the way.
He doubled home a run in the third, doubled and scored to make it 4-all in the fifth, then hit his 16th home run — but first since June 12 — leading off the seventh against reliever Ryan Webb.
In Monday's marathon, Upton hit a two-run double to put Atlanta ahead in the final inning.
Julio Teheran (7-4) allowed one earned run in 7 1-3 innings. All-Star closer Craig Kimbrel pitched a perfect ninth for his 24th save in 27 chances, and Atlanta improved to 12-2 at Marlins Park since it opened in 2012.
Henderson Alvarez (0-1) allowed five runs, four earned, in six innings for Miami.
DODGERS 6, DIAMONDBACKS 1
PHOENIX (AP) — Ricky Nolasco gave up four hits over seven innings in his Dodgers debut and surging Los Angeles beat the Diamondbacks for its 14th victory in 17 games.
Nolasco (6-8), acquired Saturday in a trade with the Miami Marlins, also doubled and singled, driving in a run and scoring another.
Adrian Gonzalez drove in three runs for Los Angeles but Hanley Ramirez went 0 for 4, snapping his 19-game hitting streak.
Ian Kennedy (3-5), facing the Dodgers for the first time since serving a 10-game suspension for his role in a bench-clearing brawl a month ago in Los Angeles, allowed six runs, five earned, and nine hits in 5 2-3 innings. He hit Ramirez with a pitch in the first inning.
The Dodgers pulled within 2 1/2 games of the NL West-leading Diamondbacks.
PHILLIES 4, NATIONALS 2
PHILADELPHIA (AP) — Cole Hamels threw eight sharp innings, Michael Young hit a two-run double and Philadelphia beat Washington for its third straight win.
Hamels (4-11) allowed one run and six hits to win consecutive starts for the first time this season. The Phillies have won six of their past eight games.
Jayson Werth hit a solo homer for Washington. The defending NL East champs have lost two straight and are only 1 1/2 games ahead of third-place Philadelphia.
Making his third career start, Taylor Jordan (0-2) gave up four runs — three earned — and eight hits in 5 2-3 innings for the Nats.
BREWERS 2, REDS 0
MILWAUKEE (AP) — Wily Peralta tossed a three-hitter for his first career shutout and Logan Schafer hit his first homer, a two-run shot that lifted Milwaukee to a victory over Cincinnati.
Peralta (6-9), whose start was pushed back from Sunday to give his aching left hamstring a couple extra days of rest, struck out six and walked four for his first complete game. It also was the Brewers' first shutout and complete game of the season.
Tony Cingrani (3-1), was almost as effective as Peralta, allowing only two singles and Schafer's home run, striking out 10 and walking two in seven innings.
Schafer was a last-minute replacement for Norichika Aoki.
CARDINALS 9, ASTROS 5
ST. LOUIS (AP) — Adam Wainwright earned his 12th win to tie for the NL lead, pitching seven scoreless innings, and Matt Holliday hit his team-high 13th homer to lead the Cardinals to a win over the Astros.
Matt Carpenter had three hits and drove in three runs for St. Louis, which has won four in a row and five of six.
Houston dropped its ninth in the last 11 and leads the majors with 58 losses.
Wainwright (12-5) improved to 13-1 in 15 career starts against Houston. His 1.56 ERA against the Astros is the lowest for any opponent. Wainwright allowed five hits, struck out nine and walked one.
The Cardinals, who jumped out to a 7-0 lead, battered Bud Norris (6-8) for seven runs and 11 hits in five innings.
METS 10, GIANTS 6
SAN FRANCISCO (AP) — Marlon Byrd's two-out grand slam capped a five-run eighth inning and the Mets beat the Giants for their third consecutive win.
A day after needing 16 innings to top the Giants in a game that ended at 12:42 a.m., the Mets squandered leads of 3-2 and 5-3 but held off the slumping World Series champions by scoring five times against their bullpen.
Omar Quintanilla had three hits for the Mets while Byrd and David Wright added two apiece. Wright drew a two-out walk before Byrd's home run off San Francisco reliever Jake Dunning.
The Giants fell a season-high nine games under .500. San Francisco also has the worst record in the majors (17-34) since May 13.
Scott Rice (4-5) retired one batter for the win.
Jose Mijares (0-2) was the loser.
PADRES 2, ROCKIES 1
SAN DIEGO (AP) — Eric Stults pitched a four-hitter, Alexi Amarista drove in two runs and the Padres snapped their 10-game losing streak with a win over the Rockies.
Stults (7-7) struck out five and walked three in the complete game, supporting his cause with two hits. He took a no-hitter into the fifth inning, when Josh Rutledge legged out an infield hit on a grounder to shortstop. He lost his shutout in the ninth when he gave up a one-out double to Wilin Rosario and a two-out RBI single to pinch-hitter Nolan Arenado.
Jhoulys Chacin (8-4) allowed one run on five hits over six innings, striking out four and walking two. The loss snapped Chacin's five-game winning streak. He had not lost since May 16.
CUBS 7, ANGELS 2
CHICAGO (AP) — Alfonso Soriano hit two of the Cubs' season high five home runs and Travis Wood earned his first win in nearly six weeks in a victory over Los Angeles.
Anthony Rizzo, Starlin Castro and Darwin Barney also homered for Chicago.
Wood (6-6) gave up four hits over 6 2-3 innings and retired 14 straight from the second inning into the sixth for his first victory since May 30.
Rizzo and Soriano hit back-to-back home runs in the first inning, Castro hit a solo homer to centre in the third and Barney hit a three-run homer in the sixth. All came off Joe Blanton (2-11), who leads the majors in losses.
ATHLETICS 2, PIRATES 1
PITTSBURGH (AP) — Dan Straily pitched two-hit ball into the seventh inning, Brandon Moss hit a two-run homer and the Athletics beat the Pirates.
Straily (6-2) struck out seven and walked three in 6 1-3 innings for his second straight strong outing. Grant Balfour worked the ninth to remain perfect in 24 save chances this season. The A's have won 10 of 13.
Gerrit Cole (4-2) lost his second consecutive decision despite working seven innings for the first time in his four-week major league career. Cole allowed five hits, struck out four and walked two.
After the start was delayed 1 hour, 42 minutes, Pedro Alvarez hit his 23rd home run but Pittsburgh matched a season high with its fourth straight loss.