Orlando led by as many as 23, but Detroit kept its starting unit in late in the preseason game and closed the gap.
Tobias Harris, who sat out the Magic's previous two games, scored 13 points and connected on all three of his 3-point attempts. But he left late in the third quarter with soreness in his left ankle and did not return.
The Magic closed the first half with a 20-5 run.
Greg Monroe led Detroit with 19 points. Andre Drummond had 14 points and 15 rebounds.
Pistons guard Will Bynum missed the game due to food poisoning, leaving rookie Peyton Siva to log 47 minutes. He scored 12 points, but also had nine turnovers.