MacDonald tallied early in the third period when his slap shot off a feed from Brock Nelson found its way through traffic and past Michal Neuvirth.
Nabokov turned aside all 22 Capitals shots en route to his second shutout of the season as the Islanders ended a five-game skid.
Neuvirth finished with 27 stops for the Capitals, losers of three in four games.
NBC reportedly holds celebs hostage to Jimmy Fallon's show
Ray Liotta sues skin care company over use of likeness