McGehee's pinch-hit homer lifts Brewers over Cubs
Prince Fielder and Ryan Braun each hit a two-run homer for Milwaukee, which has won five of six after an 0-4 start.
This was the Brewers' most dramatic win this season.
McGehee had been mired in a 3-for-22 slump this homestand and didn't get the start. Cubs reliever Kerry Wood (0-1) walked Yuniesky Betancourt to open the eighth and Betancourt reached second on a sacrifice bunt.
After George Kottaras struck out, McGehee hit the second fastball he saw into the Cubs' bullpen in right.
Chicago's Aramis Ramirez drove in three runs on three doubles, but the bullpen couldn't hold on.
After Yovani Gallardo labored through five innings, Milwaukee's bullpen ran into trouble in the seventh, with relievers Sean Green, Mitch Stetter and Kameron Loe each allowing a runner to load the bases with one out.
Tyler Colvin's RBI groundout off Loe (1-0) gave the Cubs a 5-4 lead, but it didn't last thanks to McGehee.
Brewers closer John Axford allowed a leadoff single to Marlon Byrd in the ninth, but Byrd was caught stealing and Axford retired Ramirez and Carlos Pena for his third save in four opportunities.
Ramirez had started this road trip that continues Monday in Houston 1 for 8 before doubling down the left-field line in the first inning to drive in two. Fielder tied it in the bottom of the first with his second homer.
Fielder is 11 for 18 with two home runs and 11 RBIs in the last four games after failing to knock in a run in a 3-for-17 start.
Chicago added runs in the second on Darwin Barney's RBI single and the third on Ramirez's run-scoring double to put the Cubs up 4-2, but Milwaukee tied it again on Braun's two-run shot off Casey Coleman in the bottom of the third.
Coleman got the start because Randy Wells (right forearm) is on the disabled list.
Cubs right fielder Kosuke Fukudome saved a run in the second with a diving catch for the third out and made a shoestring grab with two on and one out in the fifth to keep the game tied.
After doubling for the third time in the fifth, Ramirez was thrown out at the plate when third baseman Craig Counsell went home with Geovany Soto's slow roller to set up the back-and-forth finish.
NOTES: Coleman hit his second career double in the fourth. ... With a day off on Monday, Brewers RHP Takashi Saito (hamstring) is not expected to go on the disabled list despite his nagging injury. ... Cubs OF Alfonso Soriano also was out of the starting lineup, but pinch hit in the sixth for Fukudome, who left with a mild hamstring strain and is day to day. ... Brewers LHP Manny Parra (back) will report to Triple-A Nashville on Tuesday for his second rehab start.