Jonas Valanciunas scored 25 points, and the Raptors scored the first 13 points of the fourth quarter before holding on for a 108-98 victory over the Pistons in Detroit.
Detroit was without injured stars Andre Drummond and Blake Griffin for its home finale, but the Pistons still led by 17 in the first half.
Detroit is out of playoff contention, and Toronto had already wrapped up the top seed in the Eastern Conference. The Raptors played without Fred VanVleet and Serge Ibaka.
Valanciunas didn't play at all in the fourth, but he'd done plenty already. He finished 11 of 13 from the field and made his only attempt from beyond the arc.
The Pistons wrap up the regular season tomorrow night against the Bulls in Chicago.