The Islanders had pulled even 1-1 on Frans Nielsen's goal with 9 1/2 minutes left in the third period, but the Devils regained the advantage 90 seconds later.
On the play, Marek Zidlicky launched a shot that deflected first off Nielsen and then off the shoulder of Zajac and past Evgeni Nabokov into the net.
Adam Henrique also scored and Cory Schneider made 30 as the Devils won for the second time in five games.
Nabokov stopped 23-of-25 for the Isles, whose home-ice winless streak stretched to eight games (0-4-4).
Ohio bar shooting arrested, charged with murder
McPhee, Cokas 'working on their marriage' after affair