"It was a no-brainer, I love it in San Jose," Thornton told The Canadian Press. "It's perfect for me."
The new deal will pay him an average of $7.2 million a season starting in 2008-09. He will earn $6.67 million next season, the last year in a deal he signed with Boston after the NHL lockout.
Since being traded to San Jose in November 2005, Thornton has racked up 206 points (42-164) in 140 games. Playing in California has rejuvenated his career.
"I don't know why but it just seemed like the West really fit my play, and obviously the people surrounding me have made me that much better," said Thornton. "The trade's worked out great. I couldn't be happier in San Jose. They're a class organization."
Thornton is the leading scorer in the NHL since the beginning of 2002-03 season with 413 points (110-303).
In 672 career games with the Bruins and Sharks, the 2006 Hart Trophy winner has 660 points (211-449).
"Joe Thornton is among the top group of elite players in the National Hockey League," Sharks GM Doug Wilson said in a statement. "In addition to his play on the ice, Joe leads by example and has as much love for the game as anyone I have seen.
"Making sure Joe remained in San Jose was a top priority and he will be an integral part of our franchise as we march towards our goal of competing for the Stanley Cup next year and for years to come."