Nola turned in one of the finest starts of his major league career, carrying a no-hitter into the fifth inning on his way to seven scoreless innings.
The outing was the latest in a strong stretch for Nola, who was backed with two-run homers from Freddy Galvis and Maikel Franco. Together, they helped the Phillies to their fourth win in six games after they dropped 16 of their previous 19.
Nola had a no-hitter until two outs in the fifth inning when Jordy Mercer lined a double down the left-field line and just beyond the reach of Franco at third base.
Nola (6-5) allowed four hits, walked one and struck out eight, continuing a string of strong starts. He kept the Pirates off the bases, and when he got into trouble, the right-hander got out of jams with punchouts.
"Nola was outstanding," Phillies manager Pete Mackanin said. "He's had several good outings now. I think he's turned the corner. I think he's pitching the way he's capable of."
Joaquin Benoit and Hector Neris each pitched a scoreless inning to complete the shutout.
With two on and no outs, Nola got Francisco Cervelli to ground out before striking out Mercer and pinch-hitter John Jaso -- the last two batters he faced -- to end the inning with runners at the corners.
"I felt strong at the end," Nola said. "I wanted a double play ball in there, somewhere in that inning. But it worked out well."
Nola, who missed a month earlier this season with a lower back strain and had his 2016 season end in July because of an elbow injury, has returned to form in the last two weeks.
The Phillies' 2014 first-round draft pick has gone at least seven innings in each of his last three starts and has allowed just 13 hits and three earned runs in 21 1/3 innings (1.27 ERA) while notching 25 strikeouts (10.5 strikeouts per nine innings).
"I've had a lot of first-pitch strikes and I'm getting the leadoff hitter out a lot," Nola said of his recent success. "I think those are the big keys in the last couple of starts that I've been doing really well."
Pirates manager Clint Hurdle said, "There's not a lot of waiting him out because it was strike one or it was two of the first three pitches were strikes. A lot of offensive counts for him, pitcher's counts. We were having to do a lot of reactive hitting."
The Pirates have scored just four runs in their last three games and Monday's loss was their fourth in a row.
Pittsburgh starter Ivan Nova (8-6) gave up seven hits in six innings, but two of them were long balls.
"Wasn't sharp coming out of the gate, didn't have a curveball until the fourth inning really," Hurdle said of Nova. " He still went out there and kept us in the game, in this ballpark. Four runs isn't an insurmountable lead."
Galvis got the scoring started in the first inning, launching the first pitch he saw from Nova into the right-field bleachers for a two-run shot. Galvis' homer, his eighth of the season, came on the same day he and his wife, Ana, had their second daughter, Nicole.
"Long day. I don't know how (I had the energy)," said Galvis, who was at the hospital at 3 a.m. before his daughter was born around 5:30. "I just tried to do one thing at a time. Get a few hours of sleep and come back here. I saw everything was good (with the baby). So I got here and tried to help the team."
Franco doubled the Phillies' lead to 4-0 when his hard-hit line drive cleared the wall in left field in the third inning for his 11th home run of the season.
NOTES: Pirates OF Andrew McCutchen was named the National League Player of the Month for June. McCutchen hit .411 with a 1.193 OPS and 12 extra-base hits in 26 games. It was the fifth Player of the Month honor of his career. ... The Pirates activated C Francisco Cervelli off the disabled list and optioned RHP Edgar Santana to Triple-A Indianapolis. Cervelli was in the Pirates' starting lineup, his first game since June 19. He went 0-for-3.