Adam Fox had a goal and an assist, and Vincent Trocheck had three assists for the Rangers (47-20-4), who have won two in a row and seven of their past nine. Shesterkin made 27 saves.
New York, which is first in the Metropolitan Division, moved three points ahead of the Carolina Hurricanes. Each has 11 games remaining.
"That's a big win," Trocheck said. "Two of the better teams in the East. These games are huge late in the season, get you geared up for the playoffs. This is the style of hockey that we're going to need to play. It goes a long way when you're able to beat these teams like these guys, Boston, teams that are at the top of the League."
Matthew Tkachuk and Carter Verhaeghe each had a goal and an assist, Eetu Luostarinen scored, and Sergei Bobrovsky made 34 saves for the Panthers (45-20-5), who have lost four in a row (0-3-1).
Florida pulled within two points of the Boston Bruins for first place in the Atlantic Division with two games in hand. The Bruins lost 3-2 at the Philadelphia Flyers on Saturday.
"I liked our game tonight," Panthers coach Paul Maurice said. "I'm real happy with it, how hard they played, the effort, the stuff you guys can't hear or appreciate, just the wiredness of the bench, pulling for each other. It's been a little bit of a grinder for us, but the element that we haven't been able to grab hold of in our games was in it tonight. I was very happy with it."