Carmelo Anthony made a triumphant return Wednesday night, but Iman Shumpert made a discouraging exit.

Anthony, in his first game since getting his swollen right knee drained last Thursday, looked like a new player. He was limber and light in scoring 21 points with eight rebounds in 33 tidy minutes as the Knicks romped over the pitiful Magic, 106-94, at the Garden.

It’s the first time since 2001 the Knicks (40-26), who maintained their one-game lead over the Nets in the Atlantic Division, reached the 40-win mark this early in the season.

The good feel of Anthony’s return was dampened because Shumpert was shut down in the second half with a strained left knee — the same knee in which the young guard tore his ACL in late April. He will undergo tests today, but there were signs of optimism that it is not serious. Still, with the Knicks, something always goes wrong.

Shumpert soared for a driving layup with 25 seconds left in the first half and took a spill.

“I took a step to explode and go up to the rim and I felt it pop,” Shumpert said. “Last time I felt a pop I was out eight months. I didn’t want to hear that. They feel it’s just scar tissue breaking up. I was more scared and nervous than anything else. It was a regular take off and it buckled.

“They’re going to re-evaluate me,” Shumpert said. “They wanted to know if it stiffened. While I was sitting on the bench, I was fine. I had never felt that pop [since the comeback], and I didn’t like that feeling too much. Hopefully it all goes well tomorrow.”

The sight of a healthy Anthony was sweeter on the eyes. Anthony scored on a 3-point shot on the game’s first possession and the Knicks burst to a 22-7 lead in the opening eight minutes, buoyed by their superstar’s return after he missed the past three games and six of the past eight.

Though Anthony didn’t score much early, he took the pressure off everyone else. It was 24-9 and Anthony had just five of those points.

Orlando rallied briefly to make it a five-point game at halftime, but the Knicks cruised in the second half for their second straight win after taking the final game of the West Coast trip.

Anthony looked a lot more vibrant than he did on the two games he played out west. He blew past Long Islander Tobias Harris for one layup. He also scored on an alley-oop dunk off a pass from center Marcus Camby.

“I felt different as soon as I walked out of the hospital,’’ Anthony said. “I was pain-free tonight. As far as stamina, I felt pretty good. I didn’t feel fatigued.’’

Kenyon Martin said it was a boon to get Anthony back, “especially when he’s scoring 20 a night. It’s always a pleasure to get him back.”

Before the game, Anthony was full of bravado if relieved of knee fluid, predicting an Atlantic Division title.