TSN of Canada reported the deal is worth $3.88 million per season.
Liles, 31, who is in his first year with Toronto, has been out since Dec. 22 because of concussion-like symptoms. He has four goals and 17 assists this season, and 72 goals and 224 assists in 557 career games.
The Leafs picked up Liles in June from Colorado in return for a 2012 second-round draft pick.
He would have become an unrestricted free agent this summer.
Theater accidentally screens 'Nymphomaniac' trailer instead of Disney's 'Frozen'
Texas principal bans speaking Spanish, stirs controversy