After Chicago could only half-clear the ball in the 63rd minute, Victor Vazquez lofted the ball back into the box and Hasler headed home the winner.
Marco Delgado had opened the scoring and Sebastian Giovinco added a late goal as Toronto widened its lead in the Eastern Conference to seven points ahead of New York City FC's game on Sunday.
Delgado poked home after Chicago goalkeeper Matt Lampson could not hold Hasler's shot, but Chicago equalised early in the second half after Bastian Schweinsteiger sent a rocket from distance off the post, and David Accam turned in the rebound with his knee.
After Hasler restored the lead, Chicago pushed forward to tie it, butTosaint Ricketts broke free on the counter-attack and set up Giovinco to score his 12th goal of the year.
While Toronto stayed unbeaten in its last seven games to reach 50 points on the season, the Fire have now lost three in a row to fall nine points back in third place.
The Montreal Impactwon their fourth game in a row as Ignacio Piatti scored twice for the second time in four days to lead a 3-1 win over Real Salt Lake.
Piatti extended his scoring run to four straight games, all while being frustrated by talks over his future with Montreal, which moved into the playoff spots for the first time this season.
Montreal took the lead in the 11th minute with a goal on the counter-attack as Blerim Dzemaili passed across for Piatti to score with a first-timed shot.
RSL soon got back level as Luis Silva sent a hard shot into the roof of the net from a tight angle in the 26th minute.
But Piatti restored the hosts' lead with his second goal of the night three minutes later. Anthony Jackson-Hamel controlled a loose ball in the box and fed the Argentine, who kept his balance under a challenge before scoring.
Jackson-Hamel got on the scoresheet himself two minutes after the break by firing home at the near post after being played in on goal byLouis Beland-Goyette.
Sporting Kansas City moved to the top of the jam-packed Western Conference with a 2-0 home win over FC Dallas.
The night opened with the top four teams in the West all level on 37 points, but Sporting KC separated itself from the pack with goals from Diego Rubio and Gerso Fernandes.
Diego Rubio scored his second goal of the season in the 42nd minute when he ran in unmarked on a corner kick to lash home from seven yards.
Gerso sealed the win in stoppage time when he ran onto a long pass on the side of the box, juked past defenderMaynor Figueroa and curled a shot into the net for his first league goal since June 10.
A brutal own goal was the difference as D.C. United beat the Colorado Rapids 1-0.
Tim Howard did well to deny D.C.'s Paul Arriola and Luciano Acosta, but he didn't expect Jared Watts to try a back pass from nearly 40 yards and the ball crept past before he could get back in position.
Bill Hamid made a number of fine saves to maintain the lead before Dominique Badji hit the post for the Rapids late in the second half, and Alan Gordon thought he had an equalizer in stoppage time, but he was clearly offside.
With their suspended talisman Kaka watching from the stands, Orlando City fought back to earn a 1-1 draw with Columbus Crew SC.
After Justin Meram hit the post early, Lalas Abubakar put Crew SC ahead in the 35th minute as the Ghanaian arrived to head homeWaylon Francis' cross from a set piece.
The hosts equalised in the 67th minute asCristian Higuita gained possession in the Columbus third and played inGiles Barnes, whose shot hit both posts before going in.
Orlando couldn't find a winner after Columbus had Harrison Afful sent off following a video review for elbowingYoshimar Yotun.
Chris Wondolowski scored on a penalty kick in stoppage time to earn the San Jose Earthquakes a 2-2 draw with the Philadelphia Union.
Shea Salinas drew a foul on Joshua Yaro in the penalty area to set up the penalty kick in the 95th minute. With his 10th goal, Wondolowski became the first player in MLS history with eight straight double-digit seasons.
Roland Alberg scored in the 55th to put Philadelphia up 2-1.
Valeri Qazaishvili scored three minutes for San Jose. He eluded two defenders before punching it between two more defenders.
Jack Elliott tied it in the 35th with his first goal of the season, knocking the ball in on the left side of the net.
Fredy Montero and Yordy Reyna scored in the first half to help Vancouver beat Houston 2-1.
Montero scored on a penalty kick in the 17th minute after Reyna was brought down by Boniek Garcia. Montero sent goalkeeper Tyler Deric the wrong way with a shot that touched the right post for his 10th goal of the season.
Montero then turned provider for Reyna, who grabbed the ball outside the Dynamo box and curled a right-foot effort from 20 yards out that a leaping Deric could only watch fly into the top corner 15 minutes later.
Houston scored in the 51st minute when Mauro Manotas played a chipped pass into Romell Quioto, who in turn tapped the ball over goalkeeper David Ousted.
Chicago Fire 1-3 Toronto FC: Hasler plays hero
Nicolas Hasler's first MLS goal secured three vital points for Toronto at Chicago in a battle of two of the East's best.
Montreal 3-1 RSL: Piatti pulls the strings
Montreal looked a class above an RSL side whose defense was in a constant state of disarray, as Nacho Piatti grabbed a brace.
Sporting KC 2-0 FC Dallas: SKC dominate
Diego Rubio and Gerso both scored as Sporting Kansas City surged past FC Dallas at home.
Colorado 0-1 D.C. United: Own-goal sinks Rapids
Colorado and D.C. failed to create many chances between them, with Jared Watts' nightmare own-goal the only difference.
Orlando City 1-1 Columbus: Dramatic draw
Orlando City had to settle for a draw after Columbus were reduced to 10 men in a back-and-forth affair in Florida.
San Jose 2-2 Philly: Wondo saves the day
Chris Wondolowski heroically converted a 95th-minute penalty to earn San Jose a much-needed point against Philadelphia.
Vancouver 2-1 Houston: Dynamo run ends
Houston's unbeaten run ended at six matches as Yordy Reyna's curling effort guided Vancouver past the Dynamo.