Clifford Robinson added 17 points and Chauncey Billups 16 for the Pistons, who won their fifth straight road game and improved to 12-7 away from Auburn Hills. The 12 road wins are tops in the Eastern Conference.
Wallace, who leads the NBA in rebounding, also had three steals and two blocked shots in 42 minutes.
“If I had good will, I probably could have had 25 rebounds, but I’ll take the win,” Wallace said. “I wouldn’t have come back tonight expecting to play limited minutes. I want to play every minute of the game if I can.”
Orlando led 54-53 at halftime but was playing for the third time in four nights and ran out of gas down the stretch. The Magic were outscored 29-21 in the third quarter and 19-11 in the fourth.
The Magic won at Philadelphia on Sunday, a game in which coach Doc Rivers used three players for more than 40 minutes.
“When you play back-to-back, it comes back to haunt you the next night,” Rivers said. “I thought we had great emotion and a shot at winning the game (Sunday), so it was my decision to play them. You gotta get a win when you can get a win.”
Tracy McGrady had 20 points for the Magic after collecting 46 in a win over Detroit here on Christmas Day.
“I think we all were fatigued,” McGrady admitted. “When a couple of your key guys go down in foul trouble and then you stay on the court for extra minutes, it’ll wear you down, the way we played last night.”
Detroit coach Rick Carlisle used several players on McGrady in an effort to slow the Orlando star.
“The whole team did a job on him tonight. We did a lot of switching on him,” Carlisle said. “A lot of guys ended up playing him at different times.”
Orlando has lost four of its last five at home to fall to 12-8 at TD Waterhouse Centre.
Detroit broke open the game by hitting nine of 15 shots from 3-point range. Mehmet Okur buried a 3-pointer to give the Pistons a 94-80 lead with 4:56 left, and the Magic got no closer than 13 points thereafter.
The Magic led by as many as 13 in the first half, using an 8-2 run to extend to a 39-26 advantage with 9:06 left in the second quarter. Hill hit three medium-range jumpers during the burst.
The Pistons fought back behind Hamilton, who had nine points in a 12-0 run that gave Detroit a 53-49 lead. Orlando got the next five points, regaining the lead on a 3-pointer by McGrady one second before halftime.
Detroit scored the first eight points after intermission, highlighted by three free throws from Billups and a 3-pointer by Robinson. The Pistons led by as many as 11 points in the third period as Hamilton scored on a layup to make it 78-67 with 3:15 left.
Orlando was within five points early in the fourth quarter, but the Pistons soon pulled away, with Corliss Williamson hitting a 3-pointer and Okur scoring inside to make it 88-77 with 7:50 left.
Hamilton had 17 points in the first half.
“I really got going in the first quarter. I just tried to pace myself,” he said. “In the second quarter, when we needed a burst, that is when I needed to look for my shot a little more.”
McGrady had nine points in the opening period as the Magic built seven-point leads on several occasions.
Orlando center Steven Hunter made his first appearance of the season following knee surgery and collected six points and six rebounds in 13 minutes.