Carmelo Anthony landed 45 points as New York came back from 17 points down to snatch victory over their rivals.
NBA: Knicks edge victory over Brooklyn
In the second meeting of the two teams since the Nets moved from New Jersey to Brooklyn - and the second to go down to the wire - former Net Jason Kidd hit a three-pointer to tie it for the Knicks with 24 seconds left as he finished with 18 points.
It was a fifth straight loss for the Nets, who played a sixth straight game without the injured Brook Lopez.
Andray Blatche led Brooklyn with 23 points.
The Los Angeles Clippers extended their winning streak to seven games - their best winning streak in two decades - as they beat the Chicago Bulls 94-89 behind 22 points and 10 rebounds from Blake Griffin.
Chris Paul added 18 points for the Clippers.
Kyrie Irving showed no signs of rust as he returned from 11 games out with a finger injury to pour in 28 points and dish out 11 assists for Cleveland in a 100-94 victory over the reeling Los Angeles Lakers.
Kobe Bryant had 42 points for the Lakers with Dwight Howard collecting 19 and 20 rebounds, but they nevertheless dropped to an eighth loss in their last 11 games.
CJ Miles led Cleveland with 28 points.
Ty Lawson's 26 points led the Denver Nuggets to a 101-94 comeback victory over the Detroit Pistons.
Denver were down by 17 points in a terrible first quarter but rallied behind Lawson, as well as Andre Iguodala and JaVale McGee who had 12 points each.
Jordan Crawford's 26 points saw the Washington Wizards finally win their first road game of the season at the ninth attempt, topping the New Orleans Hornets 77-70.
Follow us @SprtNationalUAE