The Mavericks blew an eight-point lead in the final 90 seconds, then pulled out their third straight victory.
Carmelo Anthony had 44 points and nine rebounds for the Knicks. He played strong defense on the Mavericks' final possession, but was left standing in disbelief long after the buzzer after Nowitzki's shot hit the backboard first, then the front rim, then bounced up before dropping through.
Vince Carter had 23 points, Monta Ellis 22 for Dallas (35-23), which has won nine of 11 and is a season-best 12 games over .500.
Jose Calderon scored 20 and Nowitzki had 15 points for the Mavericks, who swept a three-game trip and beat the Knicks for the 20th time in the last 25 meetings.
Tyson Chandler had 12 points and 12 rebounds against his former team and sparked the Knicks' comeback after they trailed, 108-100, with 1 minute 37 seconds left. But New York (21-36) lost for the sixth time in seven games and fell a season-worst 15 games below .500.
Milwaukee 130, at Philadelphia 110: O.J. Mayo made seven three-pointers and had 25 points, Ersan Ilyasova scored 20, and the Bucks placed seven players in double figures in winning a battle between the NBA's worst teams and handing the 76ers their 11th straight defeat. Ramon Sessions had 16 points, and Khris Middleton and Brandon Knight scored 15 each for the Bucks (11-45), who own the NBA's worst record but had their highest-scoring game of the season. The 76ers (15-42) have lost 21 of 24 and 10 straight at home, their longest such skid since dropping 12 in a row during the 1996-97 season.
Golden State 104, at Detroit 96: Stephen Curry had 19 points, nine assists and eight rebounds, Klay Thompson also scored 19, and the Warriors clamped down in the second half to win their fourth straight. The Pistons have lost five of seven since firing Maurice Cheeks and replacing him with interim Coach John Loyer.
at Utah 110, Boston 98: Alec Burks had 21 points and Derrick Favors scored 20 in his return from a hip injury to help the Jazz end a three-game losing streak. Utah snapped a six-game skid against the Celtics, who lost their fifth in a row.