Dwyane Wade, who finished with 25 points and seven assists, sank two free throws with 13 seconds remaining in the fourth quarter to cap the scoring for the Heat in the best-of-seven championship series.
The Heat, in the NBA finals for the second year in a row, are trying to win their first NBA title since 2006.
James, the regular season NBA Most Valuable Player, made 11 of 23 shots from the field and was a force in both defence and offence.
He finished just shy of posting his sixth consecutive playoff game of 30 or more points.
Miami, which will host the next two games in the series, can take a stranglehold on the Thunder with a victory in game four on Tuesday.
Chris Bosh had 10 points and 11 rebounds for the Heat, who scored their final five points from the free-throw line. Miami shot 88 per cent from the line compare to only 62 per cent for the Thunder.
NBA scoring champion Kevin Durant had 25 points, Russell Westbrook scored 19 points and Kendrick Perkins had 10 for the Thunder, who got off to their best start of the series in the first quarter but couldn't execute down the stretch.
Both teams made mistakes and turned the ball over in the fourth, but Miami had more composure at the end of the game when it could have gone either way.
With just 16 seconds to play and the Thunder trailing by four points, Oklahoma City's Thabo Sefolosha turned the ball over with a bad inbounds pass to Westbrook, forcing the Thunder to foul Wade, who made two final free throws.