Johnson's 3-pointer with 2:53 left put Brooklyn in front by 12, but the Nets had to hang on at the free-throw line down the stretch in order to hand Miami its second straight loss.
The win, Brooklyn's first of the season, came in its home opener.
The Nets then made 5-of-6 from the line over the final 17 seconds, the last two coming from Johnson. Kevin Garnett fouled Miami's Chris Bosh to prevent Miami from getting a chance to tie it with a 3-pointer and Bosh made his two free throws to account for the final score.
Exploding whale video goes viral on Internet
Texas principal bans speaking Spanish, stirs controversy