Toronto's Jonathan Osorio touched Magee's free kick with his hand in the penalty area, setting up Magee's game-winning shot in the 64th minute.
With the victory, the Fire (14-12-7) moved into a third-place tie in the Eastern Conference. They will look to clinch a playoff spot with next week's season-ending match at New York.
Toronto fell to 5-17-11.
Trader Joe's: Car crashes into Long Island store, injuring 11
Exploding whale video goes viral on Internet