Up 3-2 and seeking a close-out win, the Magic had led by as many as 24 in the second half, before their shooting suddenly collapsed and Detroit took full advantage.
A shell-shocked Orlando missed 23 consecutive field goals – the longest streak in playoff history – scoring just one point in over 10 minutes of basketball.
Boos rained down on the court as a 71-54 Magic advantage was transformed into an 80-72 Detroit lead, with a stunning 26-1 run.
The Pistons sealed a 93-79 victory.
“Never say die, simple as that. I mean, Detroit grit, it’s what we’ve been talking about all year,” said Cade Cunningham, who led the way with 32 points and 10 rebounds.
Having been down 3-1 in the series, the Pistons had looked set to become just the seventh top seed in NBA history to lose in the first round to their conference’s bottom seed.
But they now have a chance to win the series back in Detroit on Sunday, and progress to an Eastern semi-final against either the Cleveland Cavaliers or the Toronto Raptors.
After an even first quarter, Orlando went on a hot streak for a sudden 17-point lead. Jalen Suggs, Desmond Bane, and Wendell Carter Jr. all sank three-pointers in less than a minute.
Paolo Banchero stirred to life, too, with Orlando shooting 62 percent in the second quarter as their defense restricted Detroit to 12 points.
Orlando’s lead stretched to 24 soon after the break, before an epic Pistons fightback began.
Detroit were suddenly winning every turnover, while the Magic’s shooting collapsed under the pressure of trying to close out their first playoff series win since 2010.
The Pistons, having dominated the regular season with a 60-22 record, will now be the favorites to win their own first playoff series since 2008.
“Thank God we get to take this back to the crib. It’s gonna be loud in Detroit, and we got to finish our business,” said Cunningham, who scored 19 in the fourth quarter.