Ryan Vogelsong won in his return to AT&T Park as the Pirates beat the Giants 8-5.
The Giants had 12 hits but Andrew McCutchen saved two runs with a diving catch in the seventh on a line drive off the bat of Eduardo Núñez.
Matt Moore allowed five runs on six hits and three walks in six innings and struck out five Pirates in his AT&T Park debut.
The Giants are now 66-52 and hold a half-game lead over the Dodgers, who had a day off Monday.
Catch game two of the series with the Pirates Tuesday at 7:15 pm on KNBR 680.