The Mavericks missed four shots after DeRozan's game-winning basket, two of the miscues coming from Dirk Nowitzki.
Dallas owned a 41-22 lead during the second period, but fell behind by eight early in the fourth quarter. Shawn Marion gave Dallas a 101-99 lead with 21 seconds left in regulation on a running jumper, after which DeRozan's basket with 16 seconds left forced overtime.
Kyle Lowry led Toronto with 20 points, Jonas Valanciunas had 18 points and 13 rebounds and DeRozan had 15.
Nowitzki led the Mavericks with 22 points. It was only the third home loss of the season in 14 games for Dallas.