Millwood (7-7), who lost his previous three decisions, relied on his fastball to get ahead of the hitters. He struck out three and walked one in his 15th career complete game.
"I located my fastball," said Millwood, who gave the Rangers their fourth complete game of the season. "I pretty much threw the fastball wherever I wanted to. When you do that it can make your other pitches better. I think I pitched better tonight than I did any time this year. It shows me the work I'm doing is paying off."
The Rangers had allowed seven or more runs in 10 of their previous 11 games before Millwood ended that trend. Texas started the night with a major league-high ERA of 5.43, 5.82 by the starters.
Rangers manager Ron Washington intended on taking Millwood out after eight innings, but Millwood wanted to complete the game and threw 113 pitches.
"He came down and said he thought he was going to take me out," Millwood said. "I said I was fine, let me finish it."
Detroit had 18 fly ball outs in what is known as a hitter's park.
"What he did more than anything else was he stayed out of the middle of the plate so he could keep [the ball] off the fat part of their bats," Washington said. "When they did center it up, we had someone standing there to catch it."
Texas had lost the first five meetings with Detroit this season, and seven in a row overall.
The highest scoring team in the majors won for the third time in 12 games.
Hamilton had three hits, including his 29th homer, a solo shot in the fourth that gave him a major league-leading 115 RBIs.
Metcalf's two-run homer in the second got the Rangers' offense started.
Boggs and Young opened the third with back-to-back homers, and Chris Davis' RBI groundout later in the inning stretched the lead to 5-0.
Miguel Cabrera drove in the only Detroit run with a fourth-inning double.
Texas got consecutive homers from Hamilton and Bradley in a three-run fourth to make it 8-1 and knock out Robertson.
"Pitches over the middle of the plate belt high, they lead to extra-base hits," Tigers manager Jim Leyland said. "It's all about starting pitching and tonight our starter had a tough outing."
Robertson allowed eight runs and eight hits in 3 2/3 innings to push his ERA to 6.09.
"My slider was awful," Robertson said. "It's been very inconsistent all year long. It was a pitch I could always have success with, but it's not doing much. It spins up there, stays up over the plate, and it gets whacked. Three of the home runs I gave up tonight were on that pitch."
Metcalf completed his first career multihomer game in the seventh off Aquilino Lopez.
Texas has had back-to-back HRs six times this season. The Rangers hadn't had two sets of consecutive HRs in a game since 1989. ... Texas' six HRs matched a season high. ... Robertson set a career-high for homers allowed. The last time a Tigers pitcher gave up five homers in a game was Jeff Weaver in 1999. ... Bradley, whose homer traveled 430 feet, returned to the lineup after being removed from Tuesday night's game with left knee soreness. ... Leyland said 12-game winner Armando Galarraga deserves consideration for AL Rookie of the Year, but will probably lose out to Tampa Bay's Evan Longoria. "Galarraga's a legitimate candidate," Leyland said. "Should he be considered? Yeah. But he won't make it. Longoria probably will get it, especially if they win." ... Washington said the Rangers' recent slide has been more disturbing than their 7-16 start. "It's the stretch run and people always remember what you did last, not what you did in the beginning," Washington said.