Wade had back-to-back baskets in Miami’s 8-0 run to start the fourth quarter after the game was tied through three. He shot 6 for 16 and added seven rebounds in 27 minutes off the bench.
The Heat have won six of their last eight games and hold a half-game lead over Orlando for the eighth and final spot in the Eastern Conference.
Emmanuel Mudiay scored 24 points for the Knicks, who have lost six straight and 14 of 15.
New York, which has lost eight straight games at home, seemed like it was going to spoil Wade’s last visit to one of his favorite arenas.
But he followed Whiteside’s basket with two of his own before Whiteside made two free throws to make it 87-79 with 9:29 to go.
The three-time NBA champion received a nice hand from the Garden crowd when he walked to the scorer’s table for the first time midway through the first quarter. Wade was then greeted with a standing ovation when he checked into the game with 4:37 left in the period.
New York honored Wade’s 15-year career with a video tribute with 2:47 remaining in the opening period after a Miami timeout.
Wade then drove to the basket for his first points of the night.
Wade’s tribute video included a warm message from coach David Fizdale, who won two NBA titles as a Miami assistant coach from 2008-16.
The Knicks coach recalled a game Wade won while both teams on the court couldn’t get anything “right.”
But Wade found a way to put the Heat over Chicago in double overtime.
“He stole the ball at the end of the game and made a running halfcourt shot to end the game. It was literally a bloodbath. I’ll never forget that night,” Fizdale recalled. “We’re battling like crazy. And somehow he figured out how to get us a win.”