Justin Verlander held the Twins in check for six masterful innings, but the Tigers' bullpen blew the lead and the Twins won in 11 innings, 4-3.
Josmil Pinto delivered the game-winner with an RBI single to right in the bottom of the 11th inning. Brian Dozier, who started the inning with a single, scored the winning run.
The win snapped a four-game losing streak for the Twins, who started the final week of the season on the right track.
Verlander struck out 12 Twins over six scoreless innings.
Minnesota broke out of a hitting slump with back-to-back RBI doubles by Eduardo Escobar and Ryan Doumit in the eighth inning to trim the Tigers lead to one, at 3-2.
Brian Dozier led off the ninth inning with a rocket of a home run to center off Detroit closer, Joaquin Benoit. Dozier, who was 0-for-4 with three strikouts before batting in the ninth, leads the Twins with 18 homers.
Mike Pelfrey gave the Twins a quality start. He allowed one run on six hits and three walks over six innings.
Ron Gardenhire now has 998 career wins.
Note: The Twins decided to shut down Joe Mauer for the rest of the season as the catcher continues to recover from a concussion.