Brad Richards and Chris Kreider also scored for New York, which has won 11 of the last 12 meetings with Philadelphia. Rangers coach John Tortorella became the 30th coach in NHL history to reach 400 wins, and his team maintained its hold on the eighth and final playoff spot in the Eastern Conference standings.
Wayne Simmonds and Jakub Voracek scored for Philadelphia, which lost for the third time in four games against New York this season and fell further out of the playoff race. The Flyers began the day in 13th place, five points behind the Rangers.
New York went ahead 3-0 with just more than 14 minutes left in the second period when Stepan scored on a backhander. Nash dumped the puck toward the net and found a wide-open Stepan, who deked Ilya Bryzgalov and had an empty net in front of him.
Just 2? minutes earlier, Richards beat Bryzgalov high to the glove side on a one-timer from the point on the power play, giving the Rangers a 2-0 advantage.
Philadelphia netted its first goal with 2:07 left in the second period when Simmonds scored from close range on the power play to pull the Flyers to 3-1. Voracek's initial shot from the point went off the post and to Claude Giroux, who redirected it in front of the crease to Simmonds.
Then the Flyers closed to 3-2 at 7:28 of the final period when Voracek scored on a deflection in front of Rangers goalie Henrik Lundqvist. Bruno Gervais won the faceoff back to Giroux, who one-timed it off Voracek and past Lundqvist, who finished with 32 saves.
But the Rangers answered just more than two minutes later when Nash scored his second of the night on a wraparound. Assists went to Carl Hagelin and Stepan, pushing New York's lead back to two goals.
The Rangers struck first with 5:06 remaining in the opening period when Nash's wrister from the slot beat Bryzgalov high on the stick side.
NOTES: Nash's first goal was the 300th of his career. ... New York has outscored Philadelphia 46-20 in their last 12 meetings. ... Before the game, the Flyers honored defenseman Kimmo Timomen for recently eclipsing 1,000 games played. The 14-year veteran received several gifts from the club, including a Tiffany crystal, a Rolex watch, a painting and a stick embossed with silver. ... Five children from Flyers owner Ed Snider's Youth Hockey Foundation took part in a question-and-answer session with President Barack Obama at the White House on Tuesday.