Nicasio (8-6) tied a season high with nine strikeouts and allowed four hits. He worked out of a bases-loaded jam in the first inning and pitched around two hit-batters before leaving after 95 pitches.
The Giants spoiled the shutout attempt on Joaquin Arias' two-out RBI double off Jeff Francis in the ninth.
DIAMONDBACKS 6, PADRES 1
PHOENIX (AP) — Brandon McCarthy turned in seven strong innings, and Paul Goldschmidt drove in two runs to lead Arizona over San Diego.
After a shaky first inning, the 6-foot-7 McCarthy (3-8) allowed only four runners over his final six innings. It was his first win since he beat San Diego on May 28. His other victory was a shutout at Miami on May 18.
Goldschmidt stretched his NL-leading RBI total to 103 with his first triple of the season and a ground out. He has the most RBIs for an Arizona hitter since Luis Gonzalez drove in 104 in 2003.
Between the first inning and when he left the game, McCarthy allowed a one-out single in the third to Venable, a two-out single in the fourth to Chase Headley and a two-out single to opposing pitcher Tyson Ross (3-7) in the fifth.