Lewis scored a game-high 23 points and Boston's Rasheed Wallace missed badly on a three-point attempt as time expired to complete an improbable come-from-behind win for the Magic
Howard scored nine straight Orlando points to spark a 12-4 run that gave the home team an 84-83 lead with 4:52 to go, their first advantage of the game.
Ray Allen made his first seven shots and finished with 20 points while Wallace had 17 for the Celtics (29-14) who lost for the first time in three games since Kevin Garnett returned from a knee injury.
Despite squandering their big lead Boston was in good position when Paul Pierce made a three-pointer and Rajon Rondo added a runner to put the team up three with 51 seconds left.
However, Magic guard J.J. Redick tied the game with a long bomb of his own, and after a defensive stop, Lewis took advantage of a defensive mix-up by the Celtics to swoop for the game-winning score.
"Rashard saved me," said Orlando coach Stan Van Gundy. "We couldn't get Vince (Carter) the ball. Rashard bailed me out."
It was the fourth win in five games for Orlando which tied the Atlanta Hawks for the Southeast Division lead -- though they trail in winning percentage.
In a reprise of the post-season when the Magic beat the Celtics in game seven, Orlando got off to a bad start and trailed by 11 at the half.
Howard recorded just five points in the first two quarters and battled foul trouble.
Garnett experienced his worst performance since rejoining Boston's lineup, meanwhile, going 2-for-8 from the field with six points.
(Writing by Jahmal Corner in Los Angeles; Editing by Alastair Himmer)