James McDonald didn't pitch terribly, but couldn't give the Pirates what they needed. McDonald only went 5.2 innings and allowed three runs on seven hits and a pair of walks.
Pittsburgh jumped on the board in the first and staked McDonald to a 2-0 lead thanks to a Pedro Alvarez single that plated two runs.
Unfortunately for the Pirates, McDonald couldn't make it stand up for long. The hurler surrendered a solo shot to Alfonso Soriano in the second before Luis Valbuena knotted the game in the third on a run-scoring double play.
The contest went into the eighth tied at three when David DeJesus singled in the eventual winning run.
Pittsburgh was only able to amass four hits, with two of them off Alvarez's bat.
Jeff Samardzija was excellent for the Cubs in his complete-game win, striking out nine while earning his ninth victory of the year.