Detroit (63-92) has won six straight, matching its season high and ensuring the Tigers will not lose 100 games. Detroit went 10-9 this year against the Royals (63-93), who dropped into the division cellar.
''We're at 92 losses, so we're not going to celebrate anything, but we're happy to sweep again,'' Tigers manager A.J. Hinch said. ''We're playing better across the board, but as a manager, I know there are a lot of things we can do better. Still, winning is nice.''
The Tigers have gone 8-2 since falling to 55-91 on Sept. 18.
''We've known all year that we can play this well,'' Baez said. ''The important thing is coming back next season and playing like this right from the start.''
Kansas City stranded 11 runners, raising its two-day total to 24, and went 2 for 10 with runners in scoring position.
''We needed that big hit and it eluded us for most of the last two days,'' Royals manager Mike Matheny said. ''It was good to see a couple of guys put a charge into the ball late in the game, but we were dealing with a pretty big gap by that point.''
Eduardo Rodriguez (5-5) allowed five hits and four walks in 6 2/3 shutout innings, but struggled after Detroit's four-run fifth.
''I feel like everything was working just the way I wanted in the first five innings,'' he said. ''In my last two innings, I was feeling cold coming off the bench - my body was cold.''
Jonathan Heasley (4-9) gave up five runs - four earned - and six hits in 4 2/3 innings.
''I thought he had good stuff and had control of the game,'' Matheny said. ''The leadoff walk in the fifth seemed to kind of send him into a spiral. We also had a misplay that turned a tough inning into a really tough one. It's hard to recover from that.''
Before a crowd of just 13,137, Castro put the Tigers ahead with a solo homer in the second but left after straining his left hamstring while running out a fourth-inning double. Castro will miss Detroit's final six games.
Detroit boosted the lead to 5-0 with a four-run fifth. Tucker Barnhart walked, advanced on a wild pitch and scored when first baseman Vinnie Pasquatino couldn't handle Akil Baddoo's hard grounder for an error. Riley Greene followed with an RBI double, and Baez homered over the Tigers bullpen in left.
Barnhart added an RBI single off Scott Barlow in the sixth, and the Tigers scored four more in the seventh. After Max Castillo allowed a single and two walks to starting the innnig, Luke Weaver hit Victor Reyes with his first pitch, Jeimer Candelario followed with a sacrifice fly and Barnhart doubled for a 9-0 lead.
''We get paid for this, so I expect full effort every game,'' Hinch said. ''I tell these guys all the time to never take one day for granted at this level. These games might be a little calm because of where the two teams are in the standings, but they are playing resolve.''
Kansas City's Ryan O'Hearn hit a two-run double in a three-run eighth.
Harold Castro started the day with three straight games with at least three or more hits, -the longest streak by a Tiger since Magglio Ordonez in 2008. Castro went 0 for 4 with a walk.
DOZIER'S HOME AWAY FROM HOME
Hunter Dozier's sixth-inning triple was his fourth at Comerica Park - his most at any road ballpark - while his 10 homers are four more than he has hit at any other opposing stadium. His career batting average in Detroit is only .195, but 17 of his 25 hits have gone for extra bases, giving him a .503 slugging percentage.
He's been a completely different hitter when facing the Tigers at home, batting .261 with one homer and a .413 slugging percentage.
Royals: RHP Brady Singer (10-4, 2.99) is scheduled to start Friday's opener of a season-ending six-game series at Cleveland against RHP Zach Plesac (3-11, 4.39).
Tigers: LHP Scott Alexander (4-10, 4.68) starts Friday's opener of a three-game series against Minnesota ad RHP Joe Ryan (12-8, 3.70).
More AP MLB: https://apnews.com/hub/MLB and https://twitter.com/AP-Sports
Copyright 2022 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.