Mario Chalmers scored 16 points, Shane Battier added 14 and Ray Allen had 11 for the Heat, who took a 22-point lead early in the second half, then prevailed despite being outscored by a whopping 30 points over a 17-minute stretch.
Miami was down eight with 5:16 remaining, and still won.
Dion Waiters scored 26 points, C.J. Miles added 19 and Kyrie Irving scored 17 for Cleveland. The Cavaliers are now 1-8 against the Heat since James signed with Miami in July 2010.
Cleveland erased a 22-point deficit in the third quarter to take the lead, and led by 97-89 with 5:16 remaining — before the Heat found a way to come back.
SPURS 97, SUNS 87
PHOENIX (AP) — Patty Mills and Kawhi Leonard scored 16 points apiece to lead six San Antonio players in double figures, and the Spurs ended their nine-game road trip with a win over Phoenix.
The Spurs, with Tony Parker out because of a sore right triceps, finished their annual long journey — caused by a rodeo back home — at 7-2 to boost their NBA-best record to 45-13.
Tiago Splitter scored nine of his 14 in San Antonio's 35-point second quarter.
Marcin Gortat scored 21 for Phoenix, 16 in the first half. Luis Scola added 15, and Goran Dragic had 10 points and 11 assists.
San Antonio beat the Suns for the sixth straight time and ninth in their last 10 meetings.
KNICKS 99, 76ERS 93
NEW YORK (AP) — Carmelo Anthony scored 29 points, Amare Stoudemire had a season-high 22 and New York snapped its longest losing streak of the season at four with a win over Philadelphia.
Anthony made 16 of 18 free throws and also was called for a flagrant foul for the fired-up Knicks, who have fallen behind Indiana into third place in the Eastern Conference and allowed their Atlantic Division lead over the Brooklyn Nets to shrink to one game.
They were sharp enough to build a couple of big leads and turn away the runs Philadelphia made, handing the 76ers their eighth straight road loss and fifth in a row overall.
Jrue Holiday had 30 points, five rebounds and five assists for the 76ers.
THUNDER 102, BULLS 72
OKLAHOMA CITY (AP) — Russell Westbrook scored 23 points, Kevin Durant had 19 points and 16 rebounds, and Oklahoma City held Chicago to the worst shooting performance in the NBA this season.
The Thunder, who had allowed an average of 113 points over their previous four games, broke out of a rough defensive patch by limiting Chicago to 29.1 per cent shooting. Midway through the third quarter, Chicago had missed 44 of its 55 shots.
The Thunder led 61-39 at that point, and the margin reached 32 with both teams' starters sitting out the fourth quarter.
Nate Robinson and Luol Deng had 13 points apiece to lead the Bulls.
LAKERS 103, MAVERICKS 99
DALLAS (AP) — Kobe Bryant had 38 points to win a scoring duel with Dirk Nowitzki, and Los Angeles beat Dallas in a matchup of teams fighting to get in the playoff race.
Bryant scored 14 in the fourth, including seven in the last 3 minutes to hold off a Dallas rally.
Nowitzki finished with 30 points and 13 rebounds for the Mavericks, who had a chance to pull virtually even with the Lakers for ninth place in the Western Conference. Houston is in eighth place, with a cushion of several games.
Former Mav Steve Nash had 13 of his 20 points in the second half in a game neither team led by more than six points.
GRIZZLIES 76, NETS 72
NEW YORK (AP) — Zach Randolph had 16 points and 14 rebounds, Marc Gasol scored 14 points and Memphis won its seventh straight game with a victory over Brooklyn.
Tony Allen added 12 points, including two free throws with 19.5 seconds left for a 74-72 lead.
Deron Williams, who led Brooklyn with 24 points, turned the ball over as he attempted to pass it to Mirza Teletovic. Williams then fouled Mike Conley, who sealed it with a pair of free throws.
Tayshaun Prince had 11 points to help the Grizzlies improve to 8-0 this season when holding opponents below 80 points.
C.J. Watson had 11 points and Andray Blatche added 10 for the Nets.
TRAIL BLAZERS 92, CELTICS 86
PORTLAND, Ore. (AP) — Wesley Matthews had 24 points, including a clutch 3-pointer with less than a minute to go, and Portland snapped a seven-game losing streak with a win over Boston.
J.J. Hickson's hook shot put the Blazers ahead 86-80, but a pair of reverse layups from Paul Pierce and Brandon Bass pulled the Celtics to 86-82 with 2:54 left.
Kevin Garnett's layup with 1:46 to go tied it, but rookie Damian Lillard answered with his own layup and added a free throw to give Portland back the lead. Matthews then hit the step-back 3-pointer that gave the Blazers the final margin with 53.9 seconds left.
Pierce had 23 points and eight assists for Boston, playing its third game in four nights.
WARRIORS 100, TIMBERWOLVES 99
MINNEAPOLIS (AP) — Jarrett Jack had 23 points and eight assists, and David Lee had 22 points and 13 rebounds to rally Golden State to a victory over Minnesota.
The Warriors trailed by 16 in the first quarter before Jack came off the bench to jumpstart the offence — as he has all season. Fellow reserve Carl Landry added 19 points and nine rebounds for Golden State, which has won three in a row following a six-game losing streak.
Derrick Williams had 23 points and 12 rebounds for the Wolves, who had a chance to win in the final seconds, but Luke Ridnour's dash down the court ended with a floater that was off the mark.
Ricky Rubio had 16 points, 11 assists, eight rebounds and six steals for Minnesota.
HORNETS 110, KINGS 95
NEW ORLEANS (AP) — Anthony Davis had 20 points and eight rebounds, and Eric Gordon added 17 points and eight assists to lead New Orleans to a victory over Sacramento.
Ryan Anderson scored 17 points, Roger Mason had 13, and Robin Lopez and Greivis Vasquez 12 apiece for New Orleans, which won its first game since an 0-3 start following the All-Star break. The Hornets also improved to 18-12 when holding opponents below 100 points.
John Salmons scored all 18 of his points in the second half for the Kings. Jason Thompson, DeMarcus Cousins and Isaiah Thomas each added 16 as Sacramento lost its fifth consecutive overall and eight straight on the road.