The Heat, who would have been eliminated from contention with a loss or a Brooklyn win over Chicago, led by as many as 22 points but needed to hold off a late Magic run to get their second win in eight games.
The four-time reigning Eastern Conference champions will have to win again in their regular season finale on Wednesday in Philadelphia to have a chance of making the playoffs.
Miami hasn't missed the postseason since the 2007-08 season.
Victor Oladipo scored 30 points and Tobias Harris had 26 points and 12 rebounds to lead the Magic, who have dropped three in a row.
They remain on the road to finish the season Wednesday against Brooklyn.
It was never closer than 15 points in the third quarter but the Magic pulled within 94-88 after an 11-0 run. But Deng buried a 3-pointer at the other end with 32.6 seconds remaining and Orlando was never closer than six.
Whiteside had nine points and seven rebounds in the first quarter and the Heat led by as much as 13 in the final seconds at the end of a 17-4 run.
The lead reached 20 points on a Mario Chalmers 3 five minutes into the second quarter and was 22 moments later on Wade's reverse layup. Whiteside had 13 points and 10 rebounds in the half and the Heat shot better than 57 percent for a 57-39 lead.
Chicago beat Brooklyn 113-86 ... Whiteside tied a career high in points ... Miami went 3-1 against Orlando this season and has won 12 of the last 13 meetings between the teams ... Heat coach Erik Spoelstra got his 350th win.