Chris Bosh hit a jumper for Miami 38 seconds into the fourth quarter to give the Heat an 82-71 advantage. Miami did not score again for more than 6 minutes while Orlando was storming to a seven-point lead.
The final points of the game came on two free throws by Orlando's J.J. Redick with 8 seconds left. Bosh and LeBron James both missed 3-point tries as time ran out.
Orlando won its fourth straight and moved within 3 1/2 games of Miami for the lead in the Southeast Division. The Heat lost their second in a row.
Richardson made six 3-pointers and scored 24 points to lead the Magic. Orlando made 16-of-30 from 3-point range and shot better from beyond the arc (53 percent) than from inside it (43 percent).
James produced 29 points for Miami and Dwyane Wade had 28.
Guard Mike Bibby made his Miami debut after being let go by Washington. He made 1-of-4 from the field, missed both free throw attempts and scored three points with one assist in 17 minutes.