The deal was reportedly worth $59.5 million,making the 31-year-old star the NHL's highest-paid netminder and the Ranger's highest-paid player.
"I really want to win a (Stanley) Cup here," Lundqvist said. "It's my biggest goal and it pushes me to work even harder."
Lundqvist would have been a free agent next year.
"I want to be a Ranger for life," he said. "That was a big thing that became really clear to me. To picture myself anywhere else, it was just wrong. In my heart it was never an option to play anywhere else."
Lundqvist, 8-11 this season with a 2.51 goals-against average and a 91.7 percent save rate, has been a finalist for the Vezina Trophy as the NHL's top goaltender in five of the past eight seasons, winning the award last year.
Overall, "King Henrik" is 284-182 with 57 regulation draws, 47 shutouts, a 2.26 goals against average and a 92 percent save rate over 531 career appearances for the Rangers, who selected him in the seventh round of the 2000 NHL Draft.
Lundqvist, a two-time Olympian who backstopped Sweden's 2006 Turin gold medal team, needs only 18 more wins to break Mike Richter's club career record and two shutouts to break Ed Giacomin's regular-season club all-time mark.
"He is everything you would want on and off the ice," said Rangers owner James Dolan. "He is the model of what you want in a player and a leader."