LeBron James decided not to play in New York two summers ago. He won’t be playing there any more this season, either.

The Knicks have been put away, and the Miami Heat are headed to the second round of the NBA playoffs.

James had 29 points, eight rebounds and seven assists, Chris Bosh and Dwyane Wade both scored 19 points and the Heat ousted the Knicks 106-94 in Game 5 of the Eastern Conference first-round series Wednesday night.

Miami won the series 4-1, and will meet Indiana in the East semifinals starting Sunday in Miami.

“We will savor this win tonight,” James said. “And then we get to work tomorrow and get ready for Indiana.”

Carmelo Anthony scored 35 points for the Knicks, including a spinning jumper over James at the end of the third quarter that pulled New York within 81-67.

It wasn’t enough to stave off an all-too-familiar playoff result for Anthony, who was chosen two spots behind James and immediately ahead of Bosh and Wade in the 2003 NBA draft. Anthony has been in 11 postseason series, winning just two, the won-lost record of his teams in those games a mere 17-37.

Stoudemire fouled out with 4:48 left, and the Knicks put together one more run with hopes of saving the season. New York cut the margin to 11 points four times in a 2-minute span, and Miami answered every time, the last of those a 3-pointer by Shane Battier with 54 seconds left.

That sent the white seat covers flying in all corners of the arena, the fans knowing it was finally over. After the final horn, James and Anthony shared an embrace, like many other players.

“It was fun, man,” James said. “He’s one of the most competitive players I’ve ever played against in a playoff series.”

The first game day salvo came eight hours before tipoff, when Wade sent a verbal jab toward former teammate Mike Bibby.

“I know Mike has made more shots in this series than he made all last year. I know that. Send that to Mike,” Wade said, laughing.

Bibby averaged 0.5 points in first-quarter appearances this season. That was before scoring eight in the opening minutes of Game 5, including a jumper over Wade that gave New York a quick 14-8 lead.

It was one of New York’s few moments to enjoy. James had 13 points on only six field-goal attempts by halftime, Wade shook off a scoreless first quarter with 12 in the second, and Miami went into the break leading 55-44.

The margin was less than 10 points for only 90 seconds of the third quarter. Stoudemire went to the bench with his fifth foul with 6:41 left in the third, and Miami went on an 11-2 spurt not long after that all but sealed the outcome. It was 67-58 when Fields made two free throws with 4:49 left in the quarter — and then the Heat’s “Big Three” needed just 3 minutes to blow the game open.

Page 2 of 2 - Bosh and Wade combined for six points in that flurry, James the other five, including a 21-footer with 1:29 left to put Miami up 78-60.

For the Knicks, it was the 12th straight season without a playoff-series victory, extending the second-longest drought in franchise history. The last time New York advanced in the postseason came at Miami’s expense in 2000 in the East semifinals.

Of the now five Heat-Knicks playoff matchups, this was the first not to be decided in an ultimate game.

New York’s season started with great expectations. Not long after the lockout ended the Knicks acquired Chandler from Dallas, a move made possible by using the amnesty clause on Chauncey Billups.

Those moves were expected. Just about everything else that happened was not.

From the firing of coach Mike D’Antoni to the emergence of Jeremy Lin before he was sidelined after knee surgery, the Knicks had a roller-coaster ride. Interim coach Mike Woodson went 18-6 down the stretch of the regular season, giving the Knicks plenty of hope for pulling off a playoff upset.

Didn’t happen. The Knicks wound up ending what was an NBA-record 13-game playoff losing streak by taking Game 4, and that was about it.

Rookie guard Iman Shumpert was lost in the third quarter of Game 1 to a torn knee ligament, Stoudemire sliced his left hand after taking out his frustrations on a metal-and-glass fire extinguisher case after a Game 2 loss, and Baron Davis shredded his knee so badly in Game 4 that he is expected to be out a year — at least.

Notes: Miami went 7-1 against the Knicks this season, including playoffs. The Heat won three of four games against Indiana this season. ... James had seven points, five assists and zero field goals in the first quarter. Only two other players (Billups in 2007 and Jerryd Bayless in 2011, both in fourth quarters) had done that in any quarter since James entered the league, according to STATS LLC. ... Bibby played more than half a game for only the fourth time this season. ... Rapper Rick Ross was among those courtside.