The San Jose Sharks retained one of the franchise's cornerstone players and lost one in moves announced Sunday.
The 37-year-old Marleau signed a three-year, $18 million contract with the Leafs with an average annual value of $6.25 million.
"Joe has become one of the faces of this franchise since his arrival in 2005 and we feel it's only fitting that he will be wearing teal going forward," general manager Doug Wilson said. "He is a generational playmaker and his accomplishments place him amongst the elite players to ever play the game.
"He has helped lead this team to new levels and continues to be one of the top two-way centers in the league. His leadership on and off the ice have been instrumental in this franchise's success, and we're excited that he has continued his commitment to this organization and the fans in San Jose."
The 38-year-old Thornton and Marleau had been together with the Sharks since 2005. They helped lead San Jose to three conference finals and one Stanley Cup Final.
Thornton's production dropped off some last season. His seven goals were the fewest since he broke into the NHL as a rookie during the 1997-98 season, but he contributed 43 assists.
A left knee injury limited his effectiveness during the playoffs this year. Thornton had surgery in the offseason and hopes to be ready to go by training camp.
Thornton ranks among the NHL's career leaders in assists (1,007) and points (1,391). He's also the franchise leader in goals, games and points.
Marleau had been an iron man with the Sharks, producing 508 goals and 574 assists during his long career while rarely missing a game. Last season, he scored 27 goals in 82 regular-season games.
"I think I've worn out a few carpets pacing around the house trying to make this decision over the last couple of days," Marleau said.
Marleau joins the up-and-coming Maple Leafs, who made it into the NHL Stanley Cup playoffs last season led by young star Auston Matthews.
"Patrick has been a pillar of this franchise since he was drafted as a 17-year-old in 1997, and has become one of the elite players in our team's history," Sharks general manager Doug Wilson said. "He owns nearly every offensive record in Sharks history, scored some big goals for our team and helped shape San Jose into a true hockey city.
"While we were hoping he would choose to return to San Jose, we wish him the absolute best.""