Taking advantage of extra space as the Knicks focused on Dwight Howard, Anderson went 7 of 13 behind the arc and is now 40 of 93 for the season.
JJ Redick added 21 points for the Magic, who won three games on the West Coast before finishing in New York and will play at home the next two nights to wrap up a stretch of three games in three nights.
Howard, who tied a career high with 45 points and set an NBA record by taking 39 free throws in Orlando's 117-109 win at Golden State on Thursday, was in foul trouble and finished with eight points and 10 rebounds. The Knicks swarmed him inside, with Tyson Chandler behind him and often bringing another big player to double him.
So the Magic turned to their perimeter game, going 17 of 35 (49 percent) from 3-point range. Anderson and Hedo Turkoglu each made two in the fourth quarter, when the Magic took control after trailing most of the game.
Carmelo Anthony had 33 points and eight rebounds in his return from a one-game absence with a sprained right ankle, but shot just 9 of 27. Toney Douglas and Iman Shumpert each scored 12 and Amare Stoudemire finished with 10, eight in the fourth quarter after also battling foul trouble.
The Knicks have lost three in a row. They opened a stretch of four games in a six-game span with another poor shooting night, which has plagued them this season.
The Knicks scored the first six points and led 23-17 after the first quarter, a lead they would maintain for most of the first three quarters. They were ahead 51-45 at halftime and still up six with 2½ minutes left in the third period before the Magic scored the final four points to cut it to 75-73.
New York led for the final time at 85-83 on Stoudemire's dunk with 7:42 remaining. Jameer Nelson made a free throw before Turkoglu and Anderson nailed consecutive 3-pointers for a 90-85 advantage. The Knicks got within three with about 3½ minutes left, but Redick scored four straight points to put it away.
Orlando has won 14 of last 17 meetings.
Notes: The Knicks fell to 18-8 on Martin Luther King Day. ... Though unclear exactly what the process would be, Knicks coach Mike D'Antoni said Baron Davis could take part in full practices soon, perhaps next week. The point guard hasn't played since the Knicks signed him because of a herniated disc in his back. ... Jason Richardson sat out with a bone bruise of his left knee.