The Cubs trailed 4-3 in the late innings, but rallied to win on a Michael Barrett grand slam in the eighth inning.
Magrane, who struck out four, walked three and hit a batter, retired 11 straight in one stretch before the Cubs rallied for three runs in the fifth.
The Cubs, who had 15 hits off six St. Louis pitchers, fell behind in the 10th and the 13th but rallied each time.
In the seventh inning, the Cubs rallied for two runs to tie the score, 4-4.
Before the Cubs rallied, Zambrano seemed ready to wilt after trying to ignite his team's stagnant offense.
Led by second baseman Ryne Sandberg, the Cubs rallied from a 9-3 deficit before winning it in extra innings.
The Pirates took a 3-0 lead in the first, but the Cubs rallied for a 4-3 lead in the third on Shawon Dunston's run-scoring single.
Then came the bottom of the ninth, when the Cubs rallied but fell short by the short distance between Jones and the center-field wall.
With Wood on the mound in Game 7, the Cubs rallied to take a 5-3 lead and then, inevitably, saw every bit of hope snuffed out.
Vaughn finally earned a Series victory in Game 5 with a five-hit shutout, as the Cubs rallied back for a 3-0 victory.