Shanahan, still the team leader with 28 goals, hadn't played since Feb. 17 when he collided violently with Philadelphia forward Mike Knuble in the Rangers' 5-3 loss to the Flyers.
The Rangers went 8-3-4 without the 38-year-old Shanahan, but he got back in time to help the playoff push. New York is seventh in the Eastern Conference with nine games - including Wednesday's matchup - left in the regular season.
It just so happened that Shanahan's return coincided with Philadelphia's final appearance of the season at Madison Square Garden, the scene of the accidental crash between the two big forwards. The players never saw each other as they skated in opposite directions near the benches while following the puck.
In Wednesday's pre-game warmups, Shanahan smiled across the red line toward Knuble and winked, telling him that he was OK. The left wing took his first shift 2:08 into the game to cheers and chants of "Shanny" from the fans at Madison Square Garden.
It was similar support from the crowd that Shanahan said woke him up after he was knocked out last month.
Knuble, who broke both a cheekbone and orbital bone when he slammed into Shanahan, played his fourth game since facial surgery and wore a full face cage.
The Rangers were without forward Martin Straka (knee) for the second straight game, but he is expected to be back Saturday at Boston. Philadelphia was missing forwards Scottie Upshall (shoulder) and Simon Gagne (hip), who could return to the lineup this weekend.
The Flyers then lost hard-hitting forward Todd Fedoruk just 21 seconds in when he was knocked out by Colton Orr's punch to the face. Orr landed a right hand to Fedoruk's left cheek, sending him to the ice on his back.
Fedoruk was removed by stretcher and taken by ambulance to St. Vincent's Hospital.