James, who missed a Wednesday loss to Boston, went 7-of-14 from the floor and also contributed six rebounds as the Heat closed the game on a 14-2 run to pull out the triumph.
Ray Allen came off the bench to score 18 points while Dwyane Wade had 14, as the Heat won the third time in four games but only the fourth in the past 10 starts.
Zach Randolph led the Grizzlies with 25 points and 14 rebounds.
Baskets by Mike Conley and Courtney Lee staked Memphis to an 84-77 lead with 4:08 remaining before Miami rallied.
Allen started the spurt with a 3-pointer, James followed with a layup and Wade scored off a rebound to level the score with 92 seconds to play.
Wade added two free throws and James hit a jump shot for Miami. Conley kept Memphis in the hunt with a lay-in to move within 88-86 but an Allen dunk with 14 seconds remaining sealed Miami’s victory.