Baez connected in the fourth inning to put Chicago in front 3-1. The blast carried 443 feet to the back set of bleachers in left-center field and came one pitch after Nick Tropeano relieved starter Joe Musgrove.
''It sounded nice when he hit it,'' Cubs manager David Ross said with a smile.
Hendricks (4-4) scattered six hits to go with six strikeouts and two walks. He had been winless in his previous three starts.
''It was just a grind all night. I was just battling myself,'' Hendricks said. ''I got better mentally and started going pitch to pitch to try to simplify things. My timing was off and I just didn't feel right.''
Anthony Rizzo added a two-run single in the seventh and the Cubs scored three times in the eighth to make it 8-2. Willson Contreras doubled in a run and the other two scored on a fielding error by shortstop Kevin Newman.
Contreras finished with three hits and lifted his batting average to .216 while Baez is hitting .200. Neither player is playing at his accustomed All-Star level, but both have been working regularly on their swings in the indoor batting cages before the game.
''We always watch each other hit,'' Baez said. ''I just start talking to him and he comes back to me and we try to pick up something and learn something from each other. I'm trying to be a good hitter, the hitter that I have been.''
The Pirates' runs came on homers by Colin Moran in the second inning and Anthony Alford in the seventh.
Moran hit a line drive 450 feet over the right-center field stands. Alford had his first home run for the Pirates, who claimed him off waivers from the Toronto Blue Jays last week.
Musgrove (0-4) went three-plus innings after being activated from the injured list prior to the game. He gave up three hits, struck out four and walked none while being limited to 46 pitches.
Musgrove had been sidelined by right triceps inflammation since Aug. 5.
''I thought the stuff looked really good,'' Pittsburgh manager Derek Shelton said. ''I thought the one thing that stood out was the sharpness of the breaking ball. You know, really sharp for a guy who's missed a month.''
The NL Central-leading Cubs won their third straight game and the Pirates lost their third in a row.
''There were a lot of good things tonight,'' Ross said.
The start of the game was delayed one hour and 11 minutes because of rain.
The Pirates announced that all their players and coaches will wear the late Roberto Clemente's No. 21 when Pittsburgh hosts the Chicago White Sox on Sept. 9.
It is a move Clemente's family and the organization hope is a step toward having Major League Baseball retire the Hall of Famer's number as it did with Jackie Robinson's No. 42 in 1997, a half-century after Robinson broke MLB's color barrier.
Pirates left-hander Derek Holland is noted for his off-the-wall sense of humor,
It showed again when he was called on to pitch in relief at the start of the fifth inning. Holland took the mound accompanied by the song ''It's a Beautiful Day in the Neighborhood,'' which was the theme for children's television show Mister Rogers' Neighborhood.
The show was taped at WQED in Pittsburgh and there is a statue of Rogers along the river walk that runs behind PNC Park.
PIRATES ROSTER MOVES
In addition to bringing Musgrove off the IL, the Pirates activated LF Bryan Reynolds from the paternity list, optioned 1B/OF Jose Osuna to the alternate training site and designated RHP Carson Fulmer for assignment.
Fulmer was claimed off waivers from the Detroit Tigers on Aug. 24 but did not appear in a game for Pittsburgh.
Cubs: LHP Jose Quintana (left lat inflammation) was placed on the 10-day IL, retroactive to Monday, and RHP Jason Adam was recalled from the alternate site. Quintana also missed the first month of the season while recovering from surgery to repair nerve damage in his left thumb. ... 3B Kris Bryant did not start a day after being activated from the IL. Ross wants to ease Bryant back into action after the 2016 NL MVP was sidelined by a sprained left finger for nearly two weeks.
Pirates: RHP Mitch Keller (strained left oblique) and RHP Jameson Taillon (Tommy John elbow surgery) are scheduled to pitch live batting practice Thursday. ... RHP Keone Kela (right forearm tightness) is playing long toss at 120 feet and should start throwing off the mound by the weekend.
Cubs: RHP Alec Mills (3-2, 5.23 ERA) will start Thursday in the finale of the three-game series. Mills has never started against Pittsburgh but notched his lone career save against them last season.
Pirates: Rookie RHP JT Brubaker (0-0, 4.50 ERA) will continue his quest for his first career win in his fifth start and seventh appearance.
Copyright 2020 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.