The Indians loaded the bases with one out in the eighth without scoring, but they came through in the ninth against Fernando Abad (0-1).
Abad's major league record over parts of four seasons fell to 1-11.
Stubbs reached on a one-out single in the ninth and moved to third on a base hit by Michael Bourn.
Jason Kipnis then hit a sharp grounder to first that Adam LaRoche speared going to his left. LaRoche threw from his knees in a bid to get Stubbs at the plate, but the Cleveland right fielder slid under the tag to end the game.
The Nationals managed only two hits in losing for the first time in three games. Cleveland has won three in a row on the heels of an eight-game losing streak.
The win went to Joe Smith (3-0), who struck out one while working a 1-2-3 top of the ninth.