Nine of the runs were unearned.
Jay, acquired Thursday in a trade with Kansas City, was hitless in 12 at-bats for the Diamondbacks before his leadoff single in Arizona's six-run first inning. His opposite-field homer in the eighth broke the game open after the Pirates had rallied from an 8-0 deficit to trail 10-8.
Starling Marte hit a three-run homer, doubled and made a diving grab in center field for the Pirates.
Fernando Salas (4-4) gave up a run in 1 1/3 innings and got the win.
The Diamondbacks, awful on offense throughout May, have scored 51 runs in the last five games. They've won 11 of 14 and lead the NL West by three games over the surging Los Angeles Dodgers.
The Pirates have lost six of eight and fell to 1-4 on a six-game trip that ends Wednesday afternoon with the series finale in the desert.
Arizona jumped on Trevor Williams (5-4) in the first with six runs, two on Ketel Marte's seventh triple of the season. Five runs were unearned thanks to three Pirates errors, two on one play.
The Diamondbacks added a pair of runs in the third, one on David Peralta's RBI triple, to lead 8-0.
But the Pirates countered with an unearned barrage of their own in a six-run fourth.
A catcher's interference call against John Ryan Murphy loaded the bases and Clay Buchholz hit Jordy Mercer with a pitch to bring in Pittsburgh's first run. Buchholz walked pinch-hitter Sean Rodriguez to bring in another. Josh Harrison followed with a sacrifice fly before Marte homered just over the right-field fence to cut what once was an eight-run Arizona lead to 8-6. Because of Murphy's error, the last four of the six runs were unearned.
Josh Bell's RBI double, his third hit of the night, trimmed Arizona's lead to 10-8 in the seventh.
Jay's homer was his second of the season.
The first inning was an ugly one for Pittsburgh.
With runners at first and second and no outs, Bell fielded Jake Lamb's grounder to first base and spiked a throw to second, with the ball bouncing into the outfield.
Marte's two-out triple brought in two more runs, and Jarrod Dyson was intentionally walked to bring up Buchholz. Williams made a pickoff move to first, threw wildly and Marte scored. The speedy Dyson headed for third and second baseman Harrison threw the ball away, allowing the runner to score.
Pirates: Harrison was back in the lineup after being hit by a pitch in the shoulder Monday night. The Pirates had said after that game that Harrison would be day to day.
Diamondbacks: RHP Braden Shipley took a line drive to the ribs in the ninth but stayed in the game to get the final out. ... LHP Robbie Ray (strained right oblique) is to make his first rehab start Thursday for Class A Visalia. ... RHP Shelby Miller (Tommy John surgery) makes his fourth rehab start, for Class A Visalia, on Saturday.
Arizona, going for its second consecutive three-game sweep, sends RHP Zack Greinke (5-4, 3.53 ERA) to the mound on Wednesday. The Pirates counter with RHP Jameson Taillon (3-5, 4.08). Greinke is 16-1 with a 2.53 ERA in his last 25 starts at Chase Field.
More AP baseball: https://apnews.com/tag/MLBbaseball