Detroit moved within one game of the White Sox for the lead in the American League Central with one meeting remaining in their four-game series.
Chicago then struck for four runs in the bottom of the eighth, three of them scoring on the second homer of the game by Kevin Youkilis.
The White Sox added a run in the ninth, after which Dan Johnson reached on a single. That brought up Orlando Hudson as the potential tying run, but Jose Valderde struck out Hudson to end the game and earn his 30th save.
Max Scherzer (16-6) was the winner, giving up a run on four hits in six innings while striking out seven. He has won six straight decisions. Gavin Floyd (9-10) was touched for three runs on four hits in 4 2/3 to take the loss.