Anders Lee scored two goals, and Jaroslav Halak made 37 saves for the Islanders (40-29-12), who failed in their bid to qualify for the playoffs for a third straight season.
Adam Pelech and Jason Chimera scored for the Islanders, who have won five straight with Halak as their starting goalie. Halak is 6-1-0 in seven games since being recalled from Bridgeport of the American Hockey League on March 23.
WATCH: All Islanders vs. Devils highlights
"[Halak] has been excellent; the numbers, his attitude, visually in the net," Islanders coach Doug Weight said. "His confidence has run through the team. And Anders Lee has been an absolute beast in all parts of the game, scoring big goals."
Beau Bennett scored twice, and Keith Kinkaid made 16 saves for the Devils (28-39-14), who will finish last in the Eastern Conference for the first time since 1985-86. The Devils outshot the Islanders 39-20.
Halak is 11-4-2 in 19 games against the Devils.
"We didn't deserve to win but found away and I'm proud of the guys," Weight said.