Kobe Bryant and Andrew Bynum each had 17 points to lead the Lakers. Lamar Odom added 15 and Pau Gasol 11.
Jason Richardson chipped in 12 points for the Magic.
Orlando rebounded from a six-point home loss to New Orleans on Friday and a snapped a string of eight straight losses to teams with winning records. Orlando's previous win against a team above .500 was Jan. 8 at Dallas.
The Lakers' loss snapped a four-game winning streak. They conclude their seven-game road trip with visits to Charlotte on Monday and Cleveland on Wednesday.
Howard scored his eighth straight point to give the Magic a 71-60 edge with just under 10 minutes to play in the game.
The Lakers scored five straight, but the Magic quickly responded with six straight points - including a pair of baskets by Brandon Bass - to increase their lead to 77-65 at the 7:48 mark.
Bass, who had missed the previous six games with a sprained left ankle, didn't start Sunday, but made his first appearance since Jan. 31 with 7:56 left in the first quarter after Ryan Anderson picked up his second foul.
Howard was fouled on a put back dunk by Gasol with 5:38 left, and his ensuing free-throw made it 84-69. The Lakers closed to within 13 points, but never got any closer.
Orlando came out of halftime hot from the field and built a 56-47 lead with 6:38 to play in the third.
Los Angeles used a 9-2 run to trim it to 58-56 with 3:37 left, forcing a Magic timeout.
But the Magic closed the quarter on a 9-4 spurt, capped by a desperation heave, turned alley-oop by Howard at the buzzer. Orlando guard Gilbert Arenas dribbled the ball off his foot in the closing seconds and tossed a wild shot toward the basket. Howard caught it and dunked it just before the horn to give the Magic a 67-60 lead entering the final quarter.
Orlando took a 45-41 advantage into the break, playing one of their most balanced offensive halves in several weeks.
Richardson, who came into Sunday's game having connected on just 12 of his previous 34 shots from the field, had a team-high 12 points on 5 of 9 shooting.
The Lakers stayed close thanks to 13 first-half points by Bryant and 11 from Bynum.
Bynum was active early underneath and had team-high nine points and six rebounds in the first period to lead Los Angeles.
The Lakers played Howard straight up defensively when Bynum was in the game and then used a combination of Gasol and Odom when Bynum was on the bench.
Howard led the Magic with nine points and five rebounds in the opening 12 minutes. He stayed clear of foul trouble until being whistled for his second personal - via a charge on Gasol - with just 17 seconds left in the quarter.
NOTES: Lakers F Matt Barnes missed his 18th straight game on Sunday with torn meniscus cartilage in his right knee. Coach Phil Jackson said he has been on the court doing some shooting recently and hopes he will begin practicing again when the team returns to L.A. from its current road trip ... The Magic set a new single-game, franchise attendance record of 19,193 ... The Magic led at the end of the first-quarter for the first time in three games ... The Lakers were whistled for just three fouls in the first half on Sunday.