On the winning play, Michael Ryder got control of the puck along the right boards and sent a pass to Merrill at the left point. The rookie defenseman unleashed a slap shot from the circle that beat Ilya Bryzgalov to the stick side.
Andre Loktionov scored in the first period for New Jersey, which snapped a two-game losing streak.
Cory Schneider earned the win with 19 saves.
Taylor Hall scored and Bryzgalov finished with 22 stops for the Oilers, who wrapped up their pre-Olympics schedule by going 2-2-0 on a four-game Eastern Conference road trip.
Swim Week Miami Beach 2014 [PHOTOS]