CHICAGO _ Jason Heyward started the Cubs off on the right foot Friday with a leadoff home run in the first inning and Jose Quintana lasted six-plus innings in a 6-2 win against the Brewers at Wrigley Field.
The Cubs moved to within a half-game of the Cardinals, who play later Friday at Oakland.
Coming off a 3-6 road trip to San Francisco, Milwaukee and St. Louis, the Cubs were in desperate need of a win.
The Cubs stranded 13 runners on the afternoon, but for once it didn't matter. Javier Baez hit a two-run, line drive home run into the left-field bleachers off Zach Davies and added a pair of doubles, going 3-for-5 with 3 RBIs as the Cubs won for the ninth time in their last 11 home games.
Quintana (9-7) earned his first win in four starts this season against the Brewers, allowing two runs on seven hits over six innings with five strikeouts. He also added an RBI single in the decisive third after Baez's two-run shot, his 26th of the season, gave the Cubs the lead for keeps.
Newcomer Nicholas Castellanos went 1-for-5 in his Wrigley Field debut and made a base-running gaffe while attempting to steal third in the fourth inning.
Cole Hamels returns from the injured list Saturday, facing Brewers left-hander Gio Gonzalez.