New York won just nine times in its opening 30 games heading into the new year, but has captured four out of five and won three in a row for the first time this season.
In the first of four meetings between the teams, New York shot 53 percent and turned the ball over only 10 times.
The Knicks outscored the Heat 59-44 in the second half.
LeBron James scored 32 points, grabbed five rebounds and handed out six assists. Miami had won three in a row and this was its ninth setback of the season.
Dwyane Wade added 23 points for the Heat while missing all six of his free throw attempts.
Miami opened a six-game road trip that will continue Friday against Brooklyn.
2014: NFL Cheerleaders [PHOTOS]
Michael Sam cut from the Dallas Cowboys