Hagman posted his second career hat trick in Toronto's first victory of the season. Lee Stempniak had a career-best four points with a goal and three assists, Matt Stajan had three assists and Mikhail Grabovski scored a goal for Toronto, which scored five goals on the power play.
Jonas Gustavsson finished with 15 saves for the Leafs.
Bobby Ryan and Corey Perry had a goal and an assist apiece and Jonas Hiller allowed six goals on 39 shots for the Ducks, who have been outscored 21-9 in four straight losses, all at home.
Celebrity Breakups and divorces of 2014 [PHOTOS]