Charlie Morton worked seven effective innings and drove in a run, as Pittsburgh dumped Miami, 4-2, in the middle test of a three-game set.
Morton (4-3) gave up two runs on six hits with five strikeouts, and his fifth-inning single tied the score one batter before the deciding run came home.
"I don't want to put anything on the shoulders of anybody else," Morton said talking about his previous struggles. "I want to go out there and do my job."
Mark Melancon tossed a scoreless ninth to earn his seventh save.
Andrew McCutchen homered and Pedro Alvarez drove in the other run for the Pirates, who have taken the first two in the series and 13 of their last 18 overall.
Donovan Solano contributed an RBI single for the Marlins, losers in four straight and six of nine.
"We're just having a tough time right now stringing hits together," said Miami manager Mike Redmond. "It seems like if we get a couple of guys on, we hit into a double play or line out. We've had some good at bats but we haven't been able to string them together."
Tom Koehler (3-7) lasted five frames in defeat, charged with seven runs and three hits, despite fanning eight.
Pittsburgh gained a valuable insurance run in the eighth. Neil Walker started the frame with a double, McCutchen singled and Walker came in on an Alvarez fly to right for a 4-2 game, but McCutchen was caught trying to steal second for the final out.
Melancon locked down the victory thanks to Giancarlo Stanton lining into a double play after a leadoff single by Ed Lucas. Logan Morrison fanned swinging to end the game.
Miami began the fourth with three straight hits, the final one an RBI single from Solano for the game's first run. Adeiny Hechavarria then grounded into a double play to plate Morrison to make it 2-0.
McCutchen's one-out homer in the fourth put the Bucs on the board, and the hosts picked up two more in the fifth.
Garrett Jones hit a leadoff single but was erased on a Josh Harrison fielder's choice. Harrison swiped second and Jordy Mercer was plunked and advanced on a wild pitch ahead of Morton's game-tying base hit. Mercer then scored when Koehler nearly hit Starling Marte in the head, but the ball instead sailed to the backstop for a 3-2 Pirates edge.
McCutchen extended his streak to five straight multi-hit games and upped his batting average at PNC Park to .359 this year ... The game was delayed by 36 minutes at the outset due to rain ... Miami has dropped five in a row in the Steel City ... Justin Wilson aided Morton with a scoreless eighth inning of relief.