A three-point shot from the corner by Chris Bosh, set up by a pass from James to Mario Chalmers, snapped a 94-94 tie with 57 seconds to go in a see-saw struggle of a fourth quarter and Ray Allen made four critical free throws to ice the win.
The tense fourth quarter featured six lead changes and four ties before the visiting Heat pulled away in the final minute.
The victory gave Miami a 3-1 lead in the best-of-seven series with a chance to clinch it at home in Game Five on Wednesday.
After losing Saturday's Game Three to Brooklyn at the Barclays Center, James carried the Heat on his broad shoulders, tying his career play-off scoring high by hitting 16-of-24 shots including a trio of three-pointers, and going 14-of-19 from the free-throw line in the bruising, physical contest.
Team mate Dwyane Wade added 15 points.
One thing that failed to go James's way was a miss on his final free throw, with one second left on the clock. That got him muttering to himself as he fell just short of the half-century mark and a career play-off scoring best.
"That's the first time I've been disappointed with myself in a win," James, who played every minute of the second half, said with a grin. "It doesn't take away from a win, but that's a free throw and I hate to miss free throws.
"Scoring 50 in a play-off game would have been pretty cool."
Joe Johnson led a balanced Nets attack with 18 points, with Paul Pierce contributing 16 as five Brooklyn players scored in double figures.
"It's very disappointing," said Johnson. "We let one get away on our home floor."
James carried Miami on his broad shoulders, steering the Heat's spread offense from the top of the key as the ball handler and distributor when he wasn't bulling his way to the hoop for layups or drawing fouls.
Miami coach Erik Spoelstra said James willed the team to victory.
"Whatever is needed," said Spoelstra. "He is simply indefatigable the entire game on both ends of the court."
"He was what was needed, on the road. That's what makes him the best player. Whatever's needed. Sometimes that means facilitating and sometimes that means going out of the box and scoring 49."
Things were testy at the start, with first-quarter technical fouls for James and Shane Battier of the Heat and the Nets' Pierce and Alan Anderson.
The Heat started quickly, making nine of their first 12 shots and led 27-22 at the end of the first quarter, boosted by 12 points from James.
With James sitting at the start of the second quarter, Brooklyn opened with a 9-2 run for a 31-29 lead, but James took charge once he returned and Miami led 56-49 at intermission.
James scored 13 points in a row at one stretch of the third quarter but the Nets were able to claw their way back, lifted by the chants of "Brook-lyn, Brook-lyn" from the sellout crowd to cut the edge to 79-76 going to the final quarter that once again swung the Heat's way.
- - -
The Portland Trail Blazers kept their season alive with a 103-92 home victory over the San Antonio Spurs that prevented a series sweep.
Having been pounded by the top-seeded Spurs in the first three games of the Western Conference semi-final, Portland came alive to cut the best-of-seven series deficit to 3-1.
Damian Lillard recorded 25 points and five assists for his best game of the second round, while Nicolas Batum put up 14 points, 14 rebounds and eight assists.
Tony Parker led San Antonio with 14 points.
The Spurs were looking to breeze into the West finals after being pushed the full seven games in the first round against Dallas, but Portland had other ideas on Monday, and a 35-20 third-quarter advantage set them on the way to their first win of the series.
Game Five is on Wednesday and moves back to San Antonio.
- Sports & Recreation
- the Heat