He will begin his new role immediately.
News broke Wednesday that the Leafs had communicated interest in Shanahan for a potential job. A source told ESPN.com on Thursday that talks had intensified between the Leafs and Shanahan over the previous 48 hours and that, barring a last-minute hiccup, a deal would get done.
The Leafs were eliminated from postseason play earlier this week, missing the playoffs for the eighth time in the past nine seasons.
Shanahan, 45, was an eight-time All-Star and three-time Stanley Cup champion in 23 NHL seasons. He has worked in the NHL's head office since 2009. Shanahan was inducted into the Hockey Hall of Fame last year.
Source: Brendan Shanahan To Join Maple Leafs
Pierre LeBrun discusses Brendan Shanahan appearing to be set to join the Maple Leafs in an executive role.