James was then fouled while shooting and made his two free throws as the crowd serenaded him with chants of "MVP." He finished with 43 points.
Rashard Lewis missed a 3-pointer with 2.5 seconds left for the Magic, who came in with the Eastern Conference's best road record, but couldn't send the Cavs to their second home loss.
James added 12 rebounds and eight assists. Mo Williams added 21 points for Cleveland, which held the Magic to 18 points in the fourth quarter.
Howard had 13 points, 15 rebounds and six blocks for the Magic. But Orlando's big man attempted just eight shots, none in the fourth quarter as the Magic chose to attack from outside.
Orlando took its last lead when Courtney Lee drove for a layup with 1:24 remaining. On Cleveland's next possession, Delonte West missed a 3-pointer, but Cavs forward Anderson Varejao got the rebound, giving the Cavs another chance.
James made the most of it.
Dribbling a few feet from Magic coach Stan Van Gundy, James surveyed his options before shooting his big 3-pointer
-- a shot that sent the Quicken Loans Crowd into a frenzy. After Howard was called for 3 seconds, James faked Lee into the air and drew a questionable foul on the rookie.
James then stepped to the line, where he has had problems in the past, and made both attempts.
Cleveland's defense made it impossible for the Magic to get a clean look on its last trip, and when Lewis missed, the Cavs had survived one of their toughest tests at home.
The temperature outside felt like June and the heat inside the building matched playoff levels. Both teams wanted this one, not just for postseason seeding, but for a psychological edge in case they meet in playoffs.
The Magic had won three straight in Cleveland and had beaten the Cavs in seven of their past nine meetings. Orlando also came in with road wins over Boston, the Los Angeles Lakers, San Antonio, Portland, Dallas and Utah.
Orlando carried a three-point lead into the fourth period and had a chance to open a four-point lead late in the quarter. But Rafer Alston missed a jumper and Williams made Orlando pay by drilling a 3-pointer from the right wing with 1:59 left to put the Cavaliers up 92-91.
Before the game, James was asked about Orlando's chances in the postseason. Although the Magic aren't mentioned as often as the Cavaliers and Celtics, James knows better than to overlook them.