Yunel Escobar, Ian Desmond and Bryce Harper each had two hits for the Nationals (21-17), who have won two of the first three games of the four-game series.
San Diego pitcher Andrew Cashner (1-7) scuffled early but settled down thereafter, allowing three earned runs (four total) on nine hits, with two walks and six strikeouts, over six innings.
Alexi Amarista singled home the Padres' lone run with two outs in the ninth inning against Nationals reliver Aaron Barrett to end San Diego's 21-inning scoreless streak.