Jacoby Ellsbury had sparked the Yankees to their early lead by drawing walks in each of the first two innings and scoring both times.
The game drew 6,870 to McKechnie Field, a new record for an exhibition opener at the park that has been the Pirates' spring home since 1969. The previous record was 6,367, in 2011 against the Rays.
Ellsbury also hit a hard infield single on his third trip to the plate in his game debut with the Yankees.
Two other big-ticket free agents also made their Yankees debuts, with Carlos Beltran going 0-for-3 and catcher Brian McCann going 1-for-2.
McCann and Ramon Flores drilled RBI singles in the first inning off left-hander Francisco Liriano, and Yangervis Solarte added a two-run homer off Edinson Volquez in the second.
The Bucs responded with a pair of runs in the bottom of the second, on a single by Jordy Mercer and Starling Marte's run-scoring grounder, both off reliever Bruce Billings. But the runs were charged to New York starter Ivan Nova, who went 1 1/3 innings.
Liriano, the Pirates' Opening Day starter, shrugged off getting hit hard in his one inning of work.
"I mainly worked on getting good command of the fastball," Liriano said. "The other pitches come around once I get the release point for the fastball. Physically, I feel 100 percent. My arm feels great. I only worry about getting ready for Opening Day."
The last time the Pirates saw Beltran, he was destroying them in the 2013 National League Division Series. His three-run homer triggered a seven-run third in St. Louis' 9-1 win in Game 1, and overall, he homered twice and drove in six runs in the five-game set.
Pittsburgh third baseman Pedro Alvarez hit three homers and recorded six RBIs in that same series, and they played to a draw in this meeting: Alvarez also went 0-for-3, with two strikeouts.
Up next: Derek Jeter gets the above-the-title billing for the home exhibition opener at Steinbrenner Field, as the Yankees host the Pirates in a rematch on Thursday at 1:05 p.m. ET. The game will be streamed free on MLB.TV with no blackouts. Jeter is due to make the first spring appearance of his farewell season, starting at short for what will be his first game action since Sept. 7.
"I've done my work. I feel like I'm ready to go," Jeter said.
Righty David Phelps gets the start.