The Astros won for just the fourth time in 33 games, improving to 11-45 on the road — the worst mark in the majors.
Paul Maholm (9-7) lost his Atlanta debut, three hits, six hits, and two walks. He struck out eight in seven innings.
The Braves had won two straight and nine of 10.
Harrell (9-7) allowed two runs and four hits with five walks and five strikeouts in six innings. Since losing at Texas on May 16, the right-hander is 3-2 with a 2.26 ERA.
Wilton Lopez got two outs to earn his second career save, and first since 2010. He had converted one of his previous 11 save opportunities.
Lopez, who took over as closer following the trade of Brett Myers and a foot injury to newly acquired Francisco Cordero, relieved Wesley Wright with the bases empty. He walked Dan Uggla before pinch-hitter Juan Francisco grounded into a double play.
Maxwell’s two-run shot made it 2-0 in the fourth, and he added his 12th homer leading off the seventh to give Houston a 3-2 lead. It was his first two-homer game since he played for Washington in an 11-3 loss at Florida on Sept. 12, 2009.
Maxwell singled in his other two at-bats to go 4-for-4 for the first time in his career.
Harrell retired the first two batters he faced in the sixth before walking Chipper Jones, Freddie Freeman and Brian McCann to load the bases. Uggla’s two-RBI single to left field tied it at 2.
Maholm, acquired Monday from the Chicago Cubs, had a career-high, five-start winning streak snapped. The left-hander came in 12-6 with a 3.11 ERA in 21 previous starts against Houston.
The Astros snapped a six-game losing streak in Atlanta with their first victory there since May 3, 2009.
Fernando Rodriguez faced the minimum in the seventh, and Wright did the same in the eighth for Houston.
Cory Gearrin, Luis Avilan and Chad Durbin combined to pitch the last two innings for Atlanta.
Harrell had allowed two hits before Jones led off the fourth with a single and moved to second on Freeman’s groundout. After McCann walked, Harrell escaped the jam when Uggla grounded into a double play.
Harrell improved to 3-6 with a 5.71 ERA in 12 starts on the road.
NOTES: Cordero will visit a doctor in Houston either Tuesday or Wednesday. He was placed on the 15-day disabled list Friday with an inflamed right toe. ... Houston manager Brad Mills said OF Steve Pearce (neck) might return to the lineup today.