KANSAS CITY, Mo. -- J.D. Martinez was in the original Detroit lineup, due to bat fifth for the Tigers on Tuesday.
Before the game, the Tigers traded the right fielder, who was hitting .305 with 16 home runs, to the Arizona Diamondbacks for three minor league prospects.
However, Detroit did not miss his bat as it bashed 16 hits, including seven for extra bases, in a 9-3 victory over the fading Kansas City Royals.
Nicholas Castellanos had a career night, finishing with four hits, including a pair of home runs, and driving in five runs. The four hits and five RBIs equaled his career highs.
"Stuff's falling now," Castellanos said. "There's no adjustment. There's no secret. There's no nothing. Baseball, underlined."
He tripled home a pair of runs to cap off a five-run second inning. He homered off Royals starter Travis Wood (1-3) in the fifth and homered off reliever Mike Minor in the seventh. His eighth-inning two-out single scored Dixon Machado.
Castellanos has 14 home runs this year. The multi-homer game was the second of his career. His first came on Aug. 19, 2015, against the Chicago Cubs.
However, his latest outburst after the Tigers (43-49) waved a white flag with the Martinez trade.
"You have to do what you have to do," Castellanos said. "We're playing with a chip on our shoulder now."
Detroit manager Brad Ausmus said, "By not winning, we were kind of backing Al (Avila, Tigers general manager) into a corner. If you keep J.D., you essentially get almost nothing for him.
"If we were 10 games over .500, we wouldn't be in this position that in some ways forced Al to make a move."
The Tigers have won four straight, matching their longest winning streak of the season. The Royals (45-47) have lost seven of eight.
Tigers starter Matthew Boyd, who was 0-2 with a 13.17 ERA in his first four career starts at Kauffman Stadium, got the win.
In the first inning, Boyd (3-5) yielded three runs on four hits, a hit batter and a sacrifice fly. He settled down after that and pitched five scoreless innings before handing off a five-run lead to the bullpen after six innings. Boyd, who was just recalled from Triple-A Toledo, allowed three runs and seven hits.
The Royals quickly plated three runs in the first inning, sending eight men to the plate. The scoring started when Eric Hosmer's ground-ball single up the middle brought home Whit Merrifield, who was hit by a Boyd pitch to lead off the inning.
Perez's sacrifice fly knocked in Lorenzo Cain with the next run. Alcides Escobar's two-out single scored Hosmer to make it 3-0. The Royals would not cross the plate again.
"We scored three in the first and were shut down after that point," Yost said. "Going into the seventh inning, we'd only gotten two more hits after the first inning."
The Kansas City lead evaporated quickly in the second inning. The Tigers batted around and scored five runs on six hits off Wood, who was making his second start after beginning the season in the bullpen.
Miguel Cabrera opened the inning with a ground-ball single that rookie second baseman Ramon Torres should have caught. Cabrera halted at third on Mikie Mahtook's double. Victor Martinez, who had three RBIs in a victory Monday, drove in both with a ground ball single to center.
Machado's sacrifice fly to Merrifield in right field scored Martinez.
Castellanos' triple, which glanced off the glove of Merrifield as he attempted to make a sliding catch, scored Alex Pressley and Ian Kinsler, making it 5-3.
Castellanos homered, his 13th, to left in the fourth. Wood left giving up six runs on nine hits in 4 1/3 innings.
"I've got to keep it from happening," Wood said of the second inning. "When it started going awry, just bear down and make some pitches. I wasn't able to stop the bleeding. That can't happen especially after the team goes out and battles and put up three. We need a shutdown inning right there.
"A couple of them I felt I could have gotten a little further inside or something. But that's baseball, balls find holes and things don't always go your way."
NOTES: The deal that sent OF J.D. Martinez to the Arizona Diamondbacks netted the Tigers three prospects: 3B Dawel Lugo, switch-hitting SS Sergio Alcantara and 18-year-old SS Jose King. The Tigers recalled OF Jim Aduci from Triple-A Toledo. ... The Tigers optioned LHP Blaine Hardy to Triple-A Toledo to make roster room for LHP Matthew Boyd, who was recalled from the Mud Hens and started Tuesday. ... SS Alcides Escobar, who left after being hit in the left wrist by a pitch Monday, was in the Royals' lineup, making his club-record 263 consecutive start. ... Tigers RHP Justin Verlander and Royals RHP Jason Hammel are the pitchers slated to start Wednesday.