"When [Maple Leaf Sports & Entertainment] approached me several months ago to discuss an extension, I told them this would be quite simple as I've had no desire to leave what we've started here with the Maple Leafs," Shanahan said.
"I'm thankful to the Board of Directors, our coaches, trainers, management and office staff, and especially our players for the professionalism and dedication they display every day."
Shanahan earned enshrinement in the Hockey Hall of Fame for a playing career that featured three Stanley Cup championships with the Detroit Red Wings and eight All-Star Game appearances. His 656 goals rank 14th in NHL history.
He joined the league office shortly after his 2009 retirement and worked his way up to senior vice president before accepting the Leafs president job in April 2014.
The 50-year-old Ontario native has overseen the rebuilding of Toronto's roster to reach a championship-contending level in recent years.
After failing to crack 70 points during his first two full years in charge, the Leafs enjoyed a breakout 2016-17 campaign with 95 points and just their second playoff berth since 2005.
They have reached the 100-plateau each of the past two seasons, highlighted by a franchise-record 49 wins during the 2017-18 campaign.
Toronto has failed to advance beyond the first round of the postseason in any of its three straight playoff appearances, though. It was eliminated by the division rival Boston Bruins the last two years.
Although the Leafs feature one of the league's most talented roster, led by centers Auston Matthews and John Tavares as well as winger Mitchell Marner, they could face some difficult decisions this offseason.
Marner headlines a group of potentially coveted restricted free agents that also includes Kasperi Kapanen and Andreas Johnsson. All three could generate offer-sheet interest from other teams, putting pressure on a Toronto front office that already has Matthews and Tavares signed to big-money contracts.
If Shanahan and general manager Kyle Dubas can keep the core together, the Leafs should enter the 2019-20 season as one of the NHL's top title contenders.