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.
Ray Liotta sues skin care company over use of likeness
Boston schools pull out free condoms over wrapping complaints