Wil Nieves also delivered a two-run shot for the Diamondbacks, who split their four-game series in Pittsburgh and clinched their first winning road trip since mid-May.
Joe Saunders (6-8) did not issue a walk in the victory. Saunders lasted seven innings, giving up three runs -- two earned -- on seven hits and three strikeouts.
Wandy Rodriguez (7-11) fell to 0-2 since joining the Pirates. He allowed four runs on seven hits over six innings. Starling Marte, Michael McKenry and Jordy Mercer drove in Pittsburgh's three runs.
Pittsburgh scored all three of its runs in the second inning to take a 3-2 lead. Arizona then took the lead for good on Nieves' two-out homer in the sixth.
Celebrity Breakups and divorces of 2014 [PHOTOS]