James was 13 of 19 from the field for Cleveland, which pulled away midway through the second half to win for the second time in three games.
Dwyane Wade led Miami with 25 points while Chris Bosh scored 16.
James, Wade and Bosh played in the same regular-season game for the first time since all were in a Miami uniform. James returned to the Cavaliers in the summer of 2014 and played in all four games against the Heat last season. Wade missed the one game Bosh played in between the teams.
James, who said Friday he planned on playing in all 82 games, showed no signs of the back troubles that sidelined him in training camp. He had five rebounds and four assists in 34 minutes.
Cleveland took an 11-point lead in the first half, but Wade and Bosh kept Miami close. The Heat trailed 63-59 in the third quarter before the Cavaliers put together a run that began with a reverse layup by James.
Tristan Thompson converted two alley-oop passes from Matthew Dellavedova for dunks, Richard Jefferson hit a 3-pointer from the corner and James scored on another drive, helping Cleveland build an 88-69 lead midway through the fourth quarter.
Miami defeated Charlotte on Wednesday to open the season. Bosh scored 21 points in his return after being sidelined in February because of a blood clot.
The teams split four games last season with the home team winning each time, all by double figures. This was the Heat's only trip to Cleveland this season while the Cavaliers visit Miami twice.
Heat: Amar'e Stoudemire scored two points with three rebounds in 11 minutes in his season debut. ... Wade surprised Mo Williams by blocking his 3-point attempt from behind in the first quarter. Williams was briefly wide open before the Miami star swooped in and swatted the shot away.
Cavaliers: Love found James with a baseball pass to the other end of the court in the third quarter. James made the catch and drove on Luol Deng for a resounding dunk. ...Thompson rejected Bosh's dunk attempt in the fourth quarter and celebrated by slapping hands with James.
Heat: Host Houston on Sunday.
Cavaliers: Visit Philadelphia on Monday.