"Everyone in here knew that was the biggest game of the year," said Riley Nash, who scored the Bruins goals.
Boston is one point behind the Toronto Maple Leafs for third place in the Atlantic Division. Toronto, which lost to the Buffalo Sabres 5-2, has a game in hand on Boston.
WATCH: All Bruins vs. Islanders highlights
"Especially on the road against an opponent that, well, we've discussed that, we're sitting right beside, so it's a big two points," Bruins coach Bruce Cassidy said.
Anton Khudobin made 18 saves. He started because Tuukka Rask was out with lower-body injury.
The Bruins were 6-for-6 with eight shots allowed on the penalty kill. They allowed seven power-play goals on 19 times shorthanded during their losing streak, including two in a 6-3 loss against the Tampa Bay Lightning on Thursday.
"We eliminated seam plays for the most part," Cassidy said. "When they got their shots, they generally went around the box. In 12 minutes of [shorthanded] time you might sneak one or two through there, but we tightened that up. That was an issue against Tampa the other night. And I think the second chances we cleared. Those were the two biggest things."