Smith (1-1) gave up just one hit — a single by Niko Goodrum to leadoff the fourth — and walked two while striking out six in 6 1/3 innings. He got his second career win, and first since Sept. 15, 2013, for San Diego against Atlanta.
Injuries limited the right-hander's career to just 5 1/3 innings the next three seasons. The Royals obtained Smith in the Rule 5 draft last December. He was making his third start of the year after beginning the season with 24 relief appearances.
Smith retired nine straight after Goodrum's single before walks to Nicholas Castellanos and Jeimer Candelario with one out in the seventh ended his night.
Tim Hill came on and gave up a three-run homer to Victor Martinez, the only batter he faced, in a 10-pitch at-bat as Detroit pulled to 5-3. Kevin McCarthy retired all five batters he faced, and Wily Peralta gave up at triple to Castellanos and a run-scoring grounder to Candelario in the ninth before finishing up for his fifth save.
Whit Merrifield doubled to open the first and scored on Moustakas' 20th homer, into the Royals' bullpen, in the first off Jordan Zimmermann (4-2).
Perez, who finished with three hits, had an RBI single in the third, a solo homer in the fifth, and a double in the eighth.
Jorge Bonifacio doubled and scored on Jose Iglesias' fielding error on Brian Goodwin's grounder in the sixth to make it 5-0.
Zimmermann, who had not worked in 13 days and had two cortisone shots for back pain, gave up four runs and seven hits in five innings. He lost to the Royals for the first time after coming in 4-0 with a 1.48 ERA in seven career appearances against Kansas City.
BRETT WELCOMES TRUMP
Royals Hall of Fame 3B George Brett welcomed President Donald Trump on Tuesday to Kansas City, meeting him at the airport. Trump was in town to speak to the VFW national convention and for a fundraiser for Republican senatorial candidate Josh Hawley.
The day also marked the 35th anniversary of Brett's Pine Tar Game at Yankee Stadium.
MOUSTAKAS JOINS POWER ELITE
Moustakas joins six other Royals with four seasons of 20 or more home runs. The others are Brett, Carlos Beltran, Steve Balboni, Bo Jackson, Mike Sweeney and John Mayberry.
Royals: INF Adalberto Mondesi was reinstated from the family medical emergency leave list. To make roster space, the Royals optioned OF Paulo Orlando, who hit .167 in 25 games, to Triple-A Omaha.
Tigers: RHP Johnny Barbato (rotator cuff tendinitis) allowed three runs on one hit and two walks, while retiring only two in a rehab start with Class-A Lakeland. ... Highly-touted prospect RHP Kyle Funkhouser, 24, fractured his right foot fifth metatarsal while walking home after a game. Funkhouser, a 2016 fourth round pick out of Louisville, was recently promoted to Triple-A Toledo.
Royals: RHP Blaine Boyer (lower back strain) made 13 pitches and retired two batters in a minor league rehab start Tuesday for Double-A Northwest Arkansas. He walked one and struck out one. RHP Jesse Hahn (elbow strain) threw one scoreless inning in the second game of the doubleheader against Arkansas. He allowed one hit, throwing six strikes in 10 pitches.
Tigers: LHP Matthew Boyd is 0-2 with a 3.46 ERA in two starts against KC this season.
Royals: LHP Danny Duffy is 5-2 with a 2.58 ERA in his past 11 starts.