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.
Texas principal bans speaking Spanish, stirs controversy
18-year-old elf alleges mall Santa pinched her buttocks on the job