The Nets made the short journey to Madison Square Garden for the Knicks' annual Martin Luther King day home game and went home victorious after Joe Johnson's go-ahead score with just over 22 seconds left.
The Knicks missed chances to win the game themselves, Carmelo Anthony off target from six feet before JR Smith, beaten by Johnson for his late jump shot, missed a three-pointer on the buzzer.
Anthony still led all scorers with 29 points while Johnson's tally of 25 was the Nets' best.
The Los Angeles Lakers' reshuffle failed to produce the desired effect as they went down 95-83 to the Chicago Bulls, their ninth defeat in 11 games and their seventh in a row away from home.
Spain star Pau Gasol was dropped to the bench but still outscored his replacement, Earl Clark, 15 points to 12 despite playing nine minutes less. Chicago's Kirk Hinrich led all scorers with 22.
The Indiana Pacers retained control of the Central Division ahead of the Bulls with a narrow 82-81 win over the Memphis Grizzlies. Four Indiana players had double-figure points totals, David West top-scoring with 14.
The Lakers' city rivals the Los Angeles Clippers were beaten 106-99 by the Golden State Warriors as Stephen Curry poured in 28 points.
All three South-West Division teams in action tasted victory, with leaders the San Antonio Spurs beating the Philadelphia 76ers 90-85 thanks to 24 points and 17 rebounds from Tim Duncan.
The New Orleans Hornets picked up only their 14th win of the season, still the fifth-lowest total in the NBA, 114-105 against a Sacramento Kings team playing their first game since a deal was agreed for them to be moved to Seattle and rebranded as the SuperSonics.
The Houston Rockets enjoyed a 100-94 success against the Charlotte Bobcats, James Harden scoring 29 points including 12 in the fourth quarter.
The Atlanta Hawks beat the Minnesota Timberwolves 104-96 while the Washington Wizards saw off the Portland Trail Blazers 98-95 with a last-second three-pointer from Jordan Crawford. Nene and Martell Webster scored 24 points apiece.