The right-hander allowed a run, struck out five and walked one in 6 2-3 innings to help the Cubs avoid their worst start in 17 years. Pedro Strop worked the ninth for the save.
Emilio Bonifacio went 2 for 4 and scored twice to continue his torrid start. The Chicago center fielder hit 11 for 16 (.688) during the opening three-game series. Mike Olt hit the first home run of his career for the Cubs.
Tony Sanchez hit a two-run single in the seventh for the Pirates but Pittsburgh couldn't put together its first 3-0 start since 2007.
Wandy Rodriguez (0-1) struggled early in his first start in 10 months but settled down late. The left-hander allowed three runs on five hits with a walk and five strikeouts. He retired 10 of the last 11 batters he faced.
Pittsburgh earned walkoff wins in the first two games of the series, including a 4-3 triumph that ended early Thursday morning after 5 hours, 55 minutes, the longest Major League Baseball game ever held in the city.
Things moved a bit more briskly on a cold, wet day at PNC Park thanks in part to a pair of pitchers who weren't in the mood to nibble at the plate.
The Cubs signed Hammel to a one-year, $6 million contract over the winter hoping the 31-year-old can provide some stability in the middle of the rotation. He was sharp in his Chicago debut, allowing singles in the first and third innings but otherwise keeping the Pirates in check.
Hammel left the seventh after walking Neil Walker with two outs. Pittsburgh took advantage of another shaky performance from Chicago's bullpen with Sanchez — who provided the walkoff hit on Wednesday — smacking a two-run single up the middle off Justin Grimm to pull the Pirates within a run.
Pittsburgh put the tying run on base leading off both the eighth and ninth, but Strop got Sanchez to line into a game-ending double play.
Rodriguez was long gone by then, though he showed some promise after early trouble. The highest-paid player on the Pirates hadn't started a game since May 31, 2013. He missed the last four months of the season with a left forearm injury but showed signs of returning to form in spring training.
That steadiness, however, didn't translate early as the Cubs touched him for a run in each of the first three innings.
NOTES: Chicago manager Rick Renteria said the club will wait to decide whether RHP Carlos Villanueva will make his scheduled start on Sunday against Philadelphia. Villanueva pitched 1 1-3 innings and took the loss on Wednesday night. ... The Cubs open the 100th season at Wrigley Park on Friday against the Phillies. Travis Wood starts for Chicago against Roberto Hernandez. ... The Pirates open a three-game series on Friday against defending NL Central champion St. Louis. Gerrit Cole, who took the loss in Game 5 of the NL division series against the Cardinals last year, starts for Pittsburgh against Shelby Miller.