Ondrej Palat had three assists for the Devils. Vitek Vanecek made 19 saves.
Adam Fox and Will Cuylle scored for the Rangers. Jonathan Quick made 14 saves.
Jesper Bratt gave the Devils a 1-0 lead with a power-play goal at 7:12 of the first period.
Luke Hughes scored 32 seconds later from above the left circle to make it 2-0.
Cuylle cut it to 2-1 at 1:58 of the second period, scoring after Braden Schneider's initial shot caromed to him off the end boards.
Mercer scored a power-play goal on a rush at 5:26 to make it 3-1.
Fox pulled the Rangers to within 3-2 with a power-play goal at 10:58, but Hughes responded with his own goal on the man-advantage to push it to 4-2 at 13:09.
Hischier scored an empty-net goal at 17:35 of the third period for the 5-2 final.