Dwyane Wade had 14 and Ray Allen scored 13 for the Heat, who tied a franchise record with their eighth straight playoff victory. They'll go for No. 9 on Saturday night, when the best-of-seven series shifts to Brooklyn for Game 3.
Mirza Teletovic set a Nets playoff record with six 3-pointers, on his way to a 20-point night off the bench. Shaun Livingston scored 15, and Paul Pierce and Joe Johnson each added 13 more for the Nets.
Deron Williams was 0 for 9 from the field, the worst shooting night of his career.
"That one hurt," Nets coach Jason Kidd said. "We were right there. We gave ourselves, on the road, an opportunity against the world champs. We let the game slip away. That one possession when they got four offensive rebounds, it didn't lose the game for us."
It was three rebounds, but no matter. It was still a backbreaker for the Nets.
Teletovic scored inside with 3:39 left to get Brooklyn within eight. For the next 100 seconds, Miami kept possession.
James missed a 3-pointer, and Allen maneuvered his way around four Nets to grab the rebound. James missed again, and Wade grabbed that board. James missed a layup, but Bosh controlled that board.
And finally, almost mercifully, Wade found James for a layup with 1:59 remaining. The lead was 10, the outcome decided.
"That was a killer," Johnson said.
Wade had just six points in the game's first 37 minutes, then eight more in the next three, setting the tone for a grind-it-out fourth quarter from Miami.
The Heat led 79-77 when Brooklyn's Marcus Thornton missed a 3-pointer with 6:21 left — which, had it gone down, would have had the Heat facing a fourth-quarter deficit for the first time in these playoffs.
But it missed. And that's when the Heat found separation for the first time all night.
James was in trouble with less than 4 seconds on the shot clock and still found a way to get a bounce pass out to Mario Chalmers in the left corner for a 3-pointer. After a stop on the ensuing Brooklyn trip, Allen hit from the same spot as Chalmers for an 85-77 lead.
"As the game wore on we started picking up the pace," Allen said. "We started to getting how we play basketball."