Yoenis Cespedes went 3-for-5 with a homer, three RBI and two runs scored and J.D. Martinez also went yard for the Tigers, who have won two straight games.
Starter Shane Greene (4-2) earned the win after allowing just five hits and two walks with four strikeouts over five scoreless innings.
Trailing 6-2 in the bottom of the eighth, Kolten Wong led off with a base hit to right off Tom Gorzelanny and came home two batters later after Heyward crushed a 3-2 slider into the Cardinals' bullpen in left field.
Joba Chamberlain took the mound and retired the final two St. Louis batters in the eighth.
The Tigers responded with a four-run ninth. Cespedes drove in two with a double off the base of the wall in center, James McCann provided an RBI double two batters later and Jose Iglesias hit a run-scoring single to left for a 10-4 game.
Cespedes opened the scoring for the Tigers in the second inning with a one-out solo shot over the left-field wall and into his team's bullpen.
In the home half, Wong was hit by a pitch with two outs and Yadier Molina and Heyward each singled to load the bases, but Martinez struck out to leave them stranded.
Anthony Gose led off the fifth with a triple and hustled home on Ian Kinsler's sacrifice fly to right to make it a 2-0 game.
Detroit added to its lead with three runs off Mitch Harris in the seventh. Cabrera followed Ian Kinsler's two-out walk with a blast to center and Martinez stroked a solo shot to left two pitches later for a five-run cushion.
Peralta countered in the bottom half for the Cardinals with a two-run shot to left, but Gose's RBI single with runners on the corners increased the Tigers lead to 6-2 in the eighth.
Cabrera tied Andres Galarraga and Al Kaline for 53rd on the all-time home run list ... Matt Holliday extended his on-base streak to 33 games to begin a season, tying Albert Pujols (2005) for second all-time in Cardinals history ... Detroit improved to 13-1 when scoring five or more runs this season ... The Cardinals are hosting the Tigers for the first time since a three-game set in 2009.