Chris Kreider and Adam Fox each had a goal in the first period before K'Andre Miller and Ryan Strome scored 30 seconds apart in the second as New York built a 4-0 lead.
Eetu Luostarinen scored 20 seconds into the third for Florida (10-1-1), poking in the puck for his fourth goal of the season. Sam Reinhart made it 4-2 at 18:34 with this third before Patric Hornqvist scored at 19:20 to make it a one-goal game. The Panthers tried for the equalizer with goalie Spencer Knight pulled for an extra skater, but Shesterkin made one more key save in the waning seconds.
''Shesty was unreal,'' said Miller, whose highlight-reel goal gave the Rangers a 3-0 lead. ''We all have faith in him back there, making big saves when we need it.''
Despite the victory against a top team, New York coach Gerard Gallant wasn't happy with his team's 60-minute effort.
''We battled for two periods but that third period is not acceptable for us,'' Gallant said. ''You're winning 4-0 and let them come back and almost tie it.''
Shesterkin, facing the Panthers for the first time, earned his sixth win this season and second straight at home. He blanked Columbus 4-0 on Oct. 29 and is 8-0-0 in his career when making at least 40 saves.
''I thought he played great,'' Florida interim coach Andrew Brunette said. ''He was exceptional.''
The Panthers entered 10-0-1, their only blemish a shootout loss at Boston on Oct. 30. They were coming off a 5-2 win over the previously undefeated Carolina Hurricanes on Saturday.
''We weren't as sharp as we'd like to be. We were casual early in the game, out of sync on different facets of the game,'' said Brunette, who took over when Joel Quenneville resigned last week. ''We got what we deserved tonight for sure.''
The Rangers, playing their third game in four nights, recovered from a 6-0 drubbing at Calgary on Saturday after they lost 6-5 in overtime at Edmonton the previous night. They scored four goals on 18 shots against Knight.
''I thought we played a real good first two periods,'' forward Mika Zibanejad said. ''We take these two points, be happy about it and move on.''
New York (7-3-3) improved to 2-1-1 at Madison Square Garden.
Kreider opened the scoring on the power play at 7:52 with his team-leading ninth goal, knocking a loose puck past Knight. Zibanejad and Artemi Panarin assisted. Kreider has five goals in his last six games.
Fox scored short-handed at 19:54 of the first, sending the Rangers off to rousing cheers with a 2-0 advantage even though the Panthers outshot the home team 11-9.
The goal was the third this season for Fox, who won the Norris Trophy last season as the NHL's best defenseman. Fox has points in 10 of 13 games this season.
The Rangers appeared to take a three-goal lead midway through the second but a goal by Panarin was negated because of goaltender interference. Brunette challenged the on-ice call and it was reversed because Strome was deemed to have impaired Knight in the crease.
With the teams playing 4-on-4, Miller went end-to-end at 12:48 for the defenseman's first goal of the season.
Strome made it 4-0 just 30 seconds later, depositing a pass from Panarin behind Knight. The goal was Strome's second this season and was also assisted by Jacob Trouba.
''That 4-on-4 turned the game for them,'' Panthers defenseman Radko Gudas said. ''We scored three in the third but we didn't have our best.''
Gudas welcomed the chance to get back on the ice Tuesday night against the Devils in New Jersey.
''That's the beauty of back-to-backs,'' he said. ''We saw some things we need to clean up.''
Florida outshot the Rangers 17-6 in the second and held a 28-15 shots advantage heading into the third.
Gallant added that his road-weary team will embrace a four-day hiatus before its next game on Saturday.
''We need the break,'' he said. ''We've had nine games on the road. That wears you down.''
NOTES: The 30-year-old Kreider tied Dean Prentice for 14th place in franchise history with 186 career goals for the Rangers, one behind Bryan Hextall Sr. ... The Rangers hadn't played the Panthers in almost two calendar years because of last season's pandemic-truncated schedule. ... New York was without center Filip Chytil, injured during Saturday's game at Calgary in a collision with teammate Sammy Blais. The Rangers also scratched defensemen Jarred Tinordi and Libor Hajek. . The Panthers scratched top goaltender Sergei Bobrovsky, defenseman Lucas Carlsson and forward Ryan Lomberg. Bobrovsky sustained an upper-body injury against Washington last Thursday.
Panthers: At the New Jersey Devils on Tuesday night.
Rangers: Visit the Columbus Blue Jackets on Saturday night.
More AP NHL: https://apnews.com/hub/NHL and https://twitter.com/AP-Sports
Copyright 2022 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.