The Mavericks led by as many as 12 points in the final period, during which Vince Carter scored 14 of his season-best 25. Carter made 5-of-10 from 3-point range.
Dallas handed the Knicks only their second loss of the season.
Carmelo Anthony led New York with 23 points, but he missed a jumper down the stretch that would have given the Knicks the lead. Raymond Felton also failed to connect on a 3-point attempt at the buzzer that would have forced overtime.
Jason Kidd, playing his first game in Dallas since leaving the Mavericks in free agency to sign with the Knicks, had a season-best 17 points.