The 23-year-old, who has also extended his contract with Super Rugby team Waikato Chiefs for another two years, made his international debut against Ireland in 2012 and has played another 21 tests since.
A hard-tackling loose forward with an eye for both the try line and a steal at the breakdown, Cane is certain to be in Steve Hansen's squad for New Zealand's World Cup defence in England later this year.
"I am really enjoying my rugby and love playing for both the Chiefs and the All Blacks," Cane said in a news release.
"I still have a lot of things I want to achieve in New Zealand Rugby. I am still relatively young and still have a lot to learn about the game and plenty of room to grow as a player.
"It was a simple decision to stay with the Chiefs. It is an enjoyable environment to be a part of with a great bunch of men.
"The coaches are world class and the future is exciting for Chiefs rugby and that is something I want to play a leading role in."
Having played half of his tests off the bench so far, Cane is in line to take custody of the New Zealand number seven shirt if, as expected, McCaw retires after the Sept. 18-Oct. 31 World Cup.
Hansen suggested that Cane might eventually inherit the captaincy as well.
"Sam is an exceptional young player who has developed into a world-class loose forward," the coach said.
"He's worked very hard over the past few seasons and is now a key player in our group.
"He is in the All Blacks leadership group, which just shows how much respect the management and players have for him."