The Heat's winning streak appeared to be in serious jeopardy when they trailed by 17 points in the second quarter, but James provided 37 points, 12 assists and seven rebounds to help spark a comeback.
The Heat's win streak is the second-longest in NBA history, trailing only the 33-gamer reeled off by the 1971-72 Los Angeles Lakers.
The Celtics, meanwhile, lost for the first time in 12 home games despite a career-high 43-point performance from Green.
Dog comes home gnawing on human bone
Julius Randle breaks leg during NBA debut