James, who scored 29 points, and Wade, who poured in 28, teamed up down the stretch to turn a 79-75 fourth-quarter deficit into an 87-80 lead with a 12-1 Miami run that lifted the Heat to a 42-17 record.
Despite 42 points from Carmelo Anthony, the Knicks dropped to 31-29 and back to eighth place for the last play-off berth in the Eastern Conference with six regular season games to go. New York had been 13-4 under interim head coach Mike Woodson.
If the Knicks finish seventh in the East, they could play the second-seeded Heat in the first round of the play-offs, although they may prefer not.
Miami, also boosted by Chris Bosh's 16 points and game-leading 14 rebounds, completed a three-game sweep of their season series with the Knicks and would have home-court advantage for the best of seven series.
With the odds slim of catching the Chicago Bulls (45-14) for top seeding in the East, the Heat are focusing on getting playoff-ready and James and Wade were particularly pleased with reversing a recent Miami trend.
"We needed to play better on the road," said James. "We know what it takes to win in the play-offs. It meant a lot (to win) today because of how we've been playing since the break on the road."
The Heat, who fell in the NBA Finals last season to the Dallas Mavericks, had wilted with eight losses in 12 games away from home since the All-Star break in late February.
"We were struggling to play a complete game on the road, and what better place to come in and focus than here," said Wade, who was returning to the court after missing a game with a sore ankle.
"We played under control, we played calm. We didn't get rattled by a run they made, the crowd getting loud, shots they made, steals they made. We just kept our composure."
With the Garden pulsating to chants of "Beat the Heat," Wade and James took charge, finding the range on their jump shots while the Knicks fired blanks at the other end.
"Offensively we were so stagnant," lamented Knicks coach Woodson. "When the game is on the line we have to get some movement and we didn't do that.
"Coming down the stretch, we just didn't get it done."
Anthony, who in the absence of the injured Amar'e Stoudemire once again took on the scoring burden, shot 14-of-27 from the floor, had five assists and pulled down nine rebounds.
"I don't even know what happened," Anthony said about the late-game surge by the Heat's dynamic duo.
"It just happened so fast. They made some tough shots down the stretch the last six minutes of the game. We couldn't make shots."