Howard, who had 20 straight double-doubles, was in foul trouble most of the game and finished with seven points and five rebounds in 24 minutes. J.J. Redick added 15 points for the Magic, who beat Miami for the first time in three games this season.
Dwyane Wade, who returned to the Heat lineup after missing four games because of a strained calf, led Miami with 21 points. Jermaine O'Neal added 16 points for the Heat, who have lost four in a row.
Wade and O'Neal combined to get Howard in foul trouble, but Miami couldn't do much when the Magic's All-Star center went to the bench. He went to the bench with his fifth foul with 7:07 left and Orlando ahead 80-70. The Magic quickly built the lead to 85-70 on Redick's 3-pointer and Jason Williams' 18-footer.
Miami got the deficit under 10 only once the rest of the game — when Rafer Alston hit back-to-back 3-pointers to make it 88-80 with 2:06 to play.
However, Redick responded with another 3-pointer and Lewis followed with his second 3-pointer to put the game away.
Howard picked up his fourth foul with 8:53 left in the third period, hammering Wade on a drive to the basket. Wade made both free throws and O'Neal knocked down three straight shots as Miami cut it to 59-58 with 5:34 left in quarter.
However, with Howard on the bench, the Magic finished the quarter on a 17-6 run. Carter and Lewis hit 3-pointers, Redick added four free throws and Orlando scored the final nine points of the quarter to take a 76-64 lead into the fourth period.
Howard played only 12 minutes in the first half. He missed all four of his field-goal attempts and had three points and two rebounds.
Lewis, Carter and Jameer Nelson picked him up, hitting 11 of 16 shots between them and combining for 32 points.
NOTES: Howard averaged 28 points, 15 rebounds and shot 64.5 percent (51 of 79) in his previous five games. ... Miami's reserves, averaging 38.8 points on 47-percent shooting in the last eight games, had only 23 points on 9-of-25 shooting.