Miami picked up its defense in the second half, surrendering 39 points overall.
Trailing by three with 1.8 seconds left in regulation, Denver's J.J. Hickson failed to inbound the ball and was called for a 5-second violation. Miami took the ball and the win.
Dwyane Wade scored 12 first-half points but left the game early in the second half. He reportedly suffered back spasms after hitting the floor upon being fouled by Jordan Hamilton 20 seconds into the third quarter.
Norris Cole also left the game after hitting his face on the floor with 8:46 left in the third quarter. Cole was fouled by Ty Lawson as he drove to the hoop and could not return because Joel Anthony shot (and made) the resulting two free throws.
Miami forward and ex-Nugget Chris Andersen (back) missed a third straight game. The Heat definitely missed Birdman's presence in the paint as they were outrebounded 37-31 overall and outscored 48-28 in the paint.
The Heat scored the first 13 points of the third quarter but trailed 77-72 entering the final period.
Miami trailed 55-46 at the half. Denver shot 56.1 percent (23 of 41), won the boards battle 19-10 and outscored Miami in the paint 28-16 during the first two quarters.
THE TURNING POINT
Beasley's 3-pointer from the top of the key gave Miami a 96-92 lead with 30 seconds left and Denver having no timeouts.
THE DIFFERENCE MAKER
LeBron James, who besides scoring, was instrumental offensively by drawing defenders and dishing off.
STAT OF THE GAME
The Heat hit 11 of 23 (47.8 percent) from behind the arc.
The Heat return home to play the Golden State Warriors 7:30 p.m. Thursday at AmericanAirlines Arena.