David Clarkson and Zach Parise also scored for the Devils, who moved ahead of the New York Rangers into first place in the Atlantic Division. New Jersey completed a 5-1 road trip, getting help in the finale from an old pro.
Shanahan, who turns 40 on Friday, scored at 1:38 of the second. He skated in from the left side along the goal line, deked Greg Zanon and fired a shot into the right side of the net, beating goalie Pekka Rinne during a 5-on-3 power play.
It was Shanahan's 651st goal, which ranks 11th on the NHL list. It also gave him 1,341 points, 24th on the career chart. Shanahan has played in 1,491 NHL games.
He has 23 goals in 42 games against the Predators, more than any other player.
Shanahan, who spent the past two seasons with the New York Rangers, made his season debut early in the first period after signing an $800,000, one-year contract Wednesday. It was his first game since May 4, 2008, in the playoffs at Pittsburgh.
Shanahan was drafted by the Devils with the No. 2 pick in 1987. He left the team in 1991, signing a free-agent contract with the St. Louis Blues.
Radek Bonk scored for Nashville, which has lost three straight.
At 3:21 of the second period, Brian Rolston ripped a one-timer from near the top of the slot that was tipped over the left shoulder of Rinne by Clarkson as he battled Jason Arnott in front of the net. It was Rolston's second assist of the game.
Nashville scored at 14:12 of the third period on the power play. Arnott fired a one-timer from above the left circle that bounced off Bonk in front of the net. The puck trickled under the pads of New Jersey goalie Scott Clemmensen.
Parise scored an empty-net goal with 14 seconds left.
Jay Pandolfo was a healthy scratch for New Jersey to make room for Shanahan, a three-time Stanley Cup champion - all with the Detroit Red Wings. He has scored at least 20 goals in 19 consecutive seasons.
Notes: The power-play goal by Shanahan was the first allowed by the Predators on home ice since Dec. 13, ending a string of 33 straight penalty kills at home, tying a franchise record. ... Clemmensen has won his last two starts. ... Jamie Langenbrunner's last two points have both been assists on power plays. ... Nashville's Jerred Smithson left with a lower-body injury in the second period and did not return.