Aramis Ramirez added a two-run single for the Cubs.
Chicago pitcher Ryan Dempster (9-8) earned the win after he allowed four runs on eight hits through 6 1/3 innings.
The Cubs are 7 1/2 games behind Colorado in the NL wild-card race.
Garrett Jones homered and drove in two runs for the Pirates, who have lost 11 of their last 12 games.
Zach Duke (10-14) was charged with the loss.
Copyright 2009 by United Press International.