McFarland replaces D.J. Smith, who was named head coach of the Ottawa Senators on Thursday.
The Leafs also announced assistant coach Jim Hiller has been granted permission to explore opportunities outside the organization.
McFarland, 33, spent the previous two seasons as an assistant coach with the Panthers. Florida fired head coach Bob Boughner and McFarland during the off-season.
Prior to joining the Panthers, McFarland spent three seasons as head coach of the Ontario Hockey League’s Kingston Frontenacs (2014-17), earning a 111-71-22 record.
The native of Richmond Hill, Ont., joined the coaching ranks in 2012, serving as an assistant with the OHL’s Oshawa Generals for two seasons.
"I’m extremely excited to be coming home and joining the Maple Leafs organization," McFarland said in a statement. "The Leafs have a great, young team and this is an amazing opportunity to work with Mike, his staff and these talented players."