He made them pay.
Kawhi Leonard scored 30 points, Green's 3-pointer with 22.7 seconds left - a wide-open one - became the gamewinner, and the Toronto Raptors improved the NBA's best record to 26-10 by topping the Heat 106-104 on Wednesday night.
Toronto has now won three games this season when trailing by 17 points.
''We've always got a chance to come back,'' Fred VanVleet said.
Green had 18 points and VanVleet added 16 for the Raptors, who survived a wild fourth quarter that saw 12 lead changes and four ties. Miami had three shots on the game's final possession, with Dwyane Wade and Justise Winslow missing 3s and Wade having a chance at a tip-in that wouldn't fall.
Wade blamed himself for Green being so open, acknowledging that he blew the coverage.
''I'm not mad at the loss. I'm mad at the way I played,'' Wade said. ''You're going to lose games in this league. That's fine. We've been playing good basketball and we played some good basketball today. ... Losses are going to happen. It's the way you bounce back from them and the last few times we've had losses we've bounced back pretty well.''
Winslow scored 21 points for Miami, which saw its five-game winning streak snapped. Josh Richardson scored 17 and Hassan Whiteside scored 16 for Miami, which was 6 for 12 from the foul line - while Toronto was 19 for 23.
Winslow's layup with 35.2 seconds left put Miami up by one, and on the next Toronto possession Green found himself wide-open in the right corner - nearly the identical spot from where Ray Allen hit a 3-pointer to deny Green and Leonard the 2013 NBA title when they were with San Antonio.
Green connected, the Raptors got the game's last stop and escaped to move to 7-0 against the Southeast Division this season.
''Gutsy win by us at the end,'' Raptors coach Nick Nurse said.
Miami led 58-44 at the half and extended the lead to 17 early in the third quarter, before Toronto went to a zone - the defense that the Heat have been using so well of late - and the game changed. VanVleet made three 3s and had 11 points while Leonard added 10 in what became a 31-12 run over the last 8:10 of the quarter by the Raptors, and they took an 81-79 lead into the fourth.
Winslow made a wild layup for a 99-93 lead that came after an 8-0 Miami run - and the Raptors needed about a minute to respond with a lead-taking 8-0 run of their own. VanVleet connected on a 3, Siakam added a three-point play and Leonard drew a blocking call against Winslow that the Heat didn't like with 1:19 left that he turned into a pair of free throws and a 101-99 Toronto edge.
''The whistle went my way tonight,'' Leonard said.
The lead changed hands four more times from there, Green's 3 marking the last of those.
''There's some really good things going on,'' Heat coach Erik Spoelstra said. ''And it was a great basketball game ... through 47 minutes.''
Raptors: It was Leonard's first game in Miami since Oct. 30, 2016. The last time he lost a game on the Heat court was Game 7 of the 2013 NBA Finals. ... Toronto outrebounded Miami 43-35.
Heat: Rodney McGruder was back in the starting lineup, after missing his first game of the year Sunday in Orlando with an illness. ... Miami debuted its ''Sunset Vice'' uniforms, with laser fuchsia the primary color. ... Whiteside was 0 for 3 from the foul line, and is now 5 for his last 36.
The Raptors were again without point guard Kyle Lowry (back tightness). Lowry has now missed five of Toronto's last six games, the other four absences caused by a thigh issue.
Yante Maten led the Heat onto the floor for pregame warmups. He ran out, turned and saw no teammates with him - they all stayed back for about a minute in an oft-used prank, enjoying a good laugh. To his credit, Maten also laughed.
Raptors: Visit Orlando on Friday.
Heat: Host Cleveland on Friday.