Jonathan Villar hit a go-ahead, solo homer in the third and added an RBI single.
Cubs starters have posted a 2.37 ERA over their last eight games and Chicago is 6-2 in that stretch. Thompson has added to the success.
"I anticipate Keegan grabbing the ball and doing what we ask him to do," Chicago manager David Ross said. "He's definitely starter depth for us, but he's also really valuable in the role he's been filling for us."
Thompson (3-0) allowed four hits and four walks in five innings, while striking out five in his second start this season. The right-hander, pressed into the rotation last week, lowered his ERA to 1.41.
"I'm just going out there and doing what they ask me to do, whether it's start or coming out of the 'pen," Thompson said. "I don't really have a role, I don't think. I'm just trying to give innings and give the team a chance to win."
Pittsburgh has one run in its last 30 innings and has not scored since the eighth inning Sunday, when the Pirates beat Cincinnati 1-0 despite not getting any hits. The Pirates had five hits Tuesday and have just nine in three games, dropping their batting average to .223. The shutout was the fifth against Pittsburgh this season.
"We've gotten down the last few days big, and we can't even do anything because of the fact that we're down," Pirates manager Derek Shelton said. "But we've got to figure out how to have better at-bats, and we have to figure out ways to get scoring opportunities."
After a rough start, the Cubs suddenly don't have that problem.
Pinch-hitter Christopher Morel homered in the ninth in his first major league at-bat, connecting on a full-count fastball from Chase De Jong to became the first Cubs player to go deep in his first at-bat since Willson Contreras on June 19, 2016.
Morel told Contreras earlier in the game that he planned to homer in his first plate appearance. After falling behind 0-2, he battled back in the count and cracked a drive deep to left.
"He told me and I felt like he was going to get something done," Contreras said. "Once I saw the ball going out, it was a no-doubt. That kid had some pop in his bat."
Cubs reliever Daniel Norris left after one out in the sixth because of right Achilles soreness. Brandon Hughes, a 26-year-old left-hander, made his major league debut and recorded his first five outs via strikeouts, while walking one.
Mark Leiter Jr. allowed one hit over the final two innings.
JT Brubaker (0-4) gave up six runs - four earned - and six hits in six innings while striking out a career-high 10.
Rookie Seiya Suzuki doubled in two runs to spark a five-run fourth inning. Frank Schwindel also had an RBI double on a chilly, drizzly night as Chicago improved to 6-11 at Wrigley Field.
Portly Pittsburgh designated hitter Daniel Vogelbach, listed at 6 feet and 270 pounds, chugged out the first triple in his seven-year big career with one out in the fourth.
Vogelbach lofted a drive to the bend in Wrigley's left-field wall where Ian Happ jumped, but couldn't make the catch. The ball caromed to the left-field corner, giving Vogelbach time rumble into third.
The next hitter, Yoshi Tsutsugo, lifted a fly down the right field line that was caught by Suzuki. Vogelbach tried to score, but was thrown out and didn't even reach the plate on his slide.
Contreras gave Vogelbach what appeared to by a playful pat, but the two started jawing and both benches emptied. The confrontation didn't last long and players went back to their dugouts and bullpens.
"I slid in," Vogelbach said. "His mask went in my side. Just doesn't feel good when a mask goes in your side, so I threw it away more than anything to get it away from me.
"I think he thought I was upset with him. I'm not really sure."
Contreras said he knows Vogelbach from time together in the minors.
"I put the tag on him and was just basically checking on him," Contreras said. "He overreacted. He kind of surprised me.
"At the end of the day, it doesn't matter. We won the ballgame and they got shut out."
The Cubs recalled INF/OF Morel from Double-A Tennessee and optioned LHP Conner Menez to Iowa on Tuesday.
Pirates: SS Kevin Newman (groin) went 0 for 2 with a walk as he began a rehab assignment with Triple-A Indianapolis on Tuesday.
Cubs: Placed OF Jason Heyward on the IL with no designation and selected contract of Hughes from Triple-A Iowa. Manager David Ross said Heyward is "doing OK" and added "he had some real stuff" that included body aches and hydration issues. Heyward, a five-time Gold Glove winner, is the third Cub recently put on the IL with no designation. ... RHPs Marcus Stroman and David Robertson also have been sidelined. Stroman has been cleared to return and threw a bullpen session on Tuesday.
Cubs LHP Drew Smyly (1-4, 3.64) is slated to start on Wednesday in the season finale. The Pirates have not announced a starter.
Christopher Morel homers on first pitch of first MLB AB
Christopher Morel's MLB debut could not have gone any better, homering on the first pitch he saw and sending Wrigley Field into a frenzy.