Lundqvist allowed four goals on 34 shots and was pulled for Ondrej Pavelec after Anisimov's second goal. Pavelec made seven saves.
"We got some good chances in the second," Rangers coach Alain Vigneault said. "[Lundqvist] kept us in. And then in the third, well, you know, we paid for the mistakes that we made."
Anisimov, who played his first three NHL seasons with the Rangers from 2009-12, completed the hat trick at 16:12 of the third when he tipped in a pass from Nick Schmaltz.
"It means more," Anisimov said of getting his first NHL hat trick against his former team. "When you go against your former team you want to play twice as hard and you want to score a goal, obviously. But I scored three today, so I'm happy."
Alex DeBrincat scored with 52 seconds left in the second period to tie the game 1-1. It was his third consecutive game with a goal, and his fourth in that span.