Jeff Tambellini and Jason Blake also scored for New York, now 4-1-0 during a seven-game homestand. Rick DiPietro, starting his 11th straight game, stopped 20 shots.
Sheldon Souray and Chris Higgins scored for Montreal. Rookie goalie Jaroslav Halak lost his first game in net after starting with three straight wins. Halak turned aside 28 shots.
With the win, the Islanders moved into a tie for seventh place in the Eastern Conference playoff race with the Canadiens at 70 points. Carolina started the day one point behind Montreal and was scheduled to play Atlanta Saturday night.
The Islanders got on the board first 2:43 into the game when Tambellini tapped in Nielsen's cross-crease pass.
Souray tied the game for Montreal on a two-man advantage. His rising slapshot from the right point caught the upper right corner at 13:54 in the first period.
Souray has 21 goals, 15 on power plays. He's three power-play goals away from tying the league record of 18 by a defenceman in a season, shared by Adrian Aucoin and Denis Potvin.
Later in the first period Blake put the Islanders up 2-1 with his career-best 29th goal. He moved down the right side and beat Halak with a backhander to the far corner at 15:58.
Halak made a wonderful glove save eight minutes into the second period to keep the game close. He went low to rob Arron Asham's right circle wrist shot.
Nielsen, the first NHL player from Denmark, became the first NHL player from Denmark to score a goal when he flipped Richard Park's cross-crease pass over Halak at the 10:52 of the second period.
Long Island native Higgins cut the gap to 3-2 with his 17th goal of the season at 3:50 of the final period. He tipped Mark Streit's high-slot slapper past DiPietro.
Montreal had a golden opportunity to tie the game at 8:15, but defenceman Brendan Witt, standing in the crease, blocked a shot with DiPietro down and out of the net.
Notes: Higgins returned to the lineup after missing a win at Nashville on Thursday. He suffered a shoulder injury during a 5-3 win at home over Washington on Tuesday. ... The last rookie goalie for the Canadiens to win at least his first four starts in net was Wayne Thomas, who won his first seven starts in 1973. ... New York has just two regulation losses in its previous 15 games (9-2-4), both 2-0 losses to New Jersey. ... The attendance was 16,234, just the fourth sellout of the season for New York.