James went down with 5:50 remaining after he was struck by Oklahoma City's Serge Ibaka on a drive to the basket. James finished the dunk, but was bloodied and left the court with a towel over his face.
Dwyane Wade had 24 points and 10 assists and Chris Bosh added 24 points for Miami, which won its fourth straight and avenged an earlier loss to Oklahoma City.
After a slow start, Kevin Durant scored 28 points for Oklahoma City. Russell Westbrook, who had missed the previous 27 games after having a surgery on his right knee, started and scored 16 points, making four of 12 shots.
Oklahoma City lost at home for the first time since Jan. 5.
The Thunder overcame an early 18-point deficit on Jan. 29 to roll past the Heat 112-95 in Miami, and the home fans hoped for a regular-season sweep against the team that beat Oklahoma City in the 2012 NBA Finals.
The crowd erupted as Westbrook was introduced as a starter. His first minute of action was furious and had the crowd on its feet. His first basket was a two-handed, fast-break dunk 37 seconds into the game, and he got a steal 17 seconds later.
The excitement quickly evaporated. James scored 10 points in the first 3:11 on 5-for-5 shooting and Miami made 13 of its first 14 shots to take a 28-13 lead. James scored 16 points to help the Heat lead 34-17 at the end of the first quarter.
at Golden State 102, Houston 99: Stephen Curry made a tying layup with 3.2 seconds left in regulation and finished with 25 points, and the Warriors outlasted the Rockets in overtime to halt Houston's eight-game winning streak.
Just after James Harden hit a go-ahead jumper, Curry came back with a left-handed layup over Dwight Howard to send the game to overtime. The Warriors got a big boost in overtime when Jermaine O'Neal, who was filling in for injured center Andrew Bogut, blocked Chandler Parsons' baseline dunk attempt at the rim.
Curry followed with two free throws to give Golden State a 98-95 lead with 15.9 seconds left. The teams traded free throws as the Rockets ran out of time. Harden scored 34 of his 39 points in the second half.
Wilson Chandler scored 15 while J.J. Hickson added 14 points and 10 rebounds in a matchup of two teams left short-handed by deals they made before Thursday afternoon's trade deadline.
Caron Butler scored 17 for the Bucks, who have not won two straight games all season. Ersan Ilyasova had 14 points and 11 rebounds.
With Denver leading 78-67 going into the fourth quarter, Milwaukee got within five points on John Henson's dunk off an alley-oop Giannis Antetokounmpo, plus a pair of jumpers by Caron Butler. But the Nuggets responded with a 12-2 run, including a powerful two-handed putback slam dunk by Faried, and put the game away.