With the game tied 3-3, Schierholtz led off the eighth with a double against John Axford (0-2), went to third on Welington Castillo's sacrifice, and after Dioner Navarro walked, came home on Hairston's pinch-hit sac fly.
David DeJesus followed with a two-run single to break the game as Chicago logged a series-evening victory.
The Cubs had erased a 3-1 deficit in the previous inning on RBI from Starlin Castro and Anthony Rizzo.
DeJesus ended 3-for-5 and Rizzo knocked in a pair of runs in the win.
Carlos Marmol (1-1) earned the decision with a scoreless eighth and Kyuji Fujikawa recorded the save for Chicago.
Milwaukee's Jean Segura and Ryan Braun each drove in a run as the Brewers fell for the sixth time in seven games.