Moustakas opened the ninth inning against White Sox reliever Zach Putnam by rifling a single to right field and took second on Alcides Escobar's sacrifice bunt. Nori Aoki then singled to center field.
"He beat the shift with a rocket. A tremendous read on Nori's base hit. … And a great, hard slide at the plate," said Royals manager Ned Yost.
Third-base coach Mike Jirschele waved Moustakas home.
"I knew it was going to be close," Moustakas said.
Adam Eaton's throw arrived at the plate ahead of him, but he slid into Flowers' glove and the ball flew away. He was safe and Flowers was charged with an error.
"In all honesty, I thought I had it the whole time," Flowers said. "I wish I would have hung onto it, but there was nothing I could do different. I don't regret anything I did, and I'm not going to do anything different next time."
Except maybe hang onto the ball.
Aoki was watching the play as he advanced to second base.
"It looked like he was going to be out, but the catcher dropped the ball," Aoki said. "Maybe it was just the whole team wanting that run to score made it happen."
Ah, yes, the power of positive thinking.
The Royals then loaded the bases but couldn't pad the lead as Billy Butler, a late substitute for the sore-handed Eric Hosmer, rolled into a double play.
But one run was enough for closer Greg Holland, who pitched a perfect ninth. Which, in turn, came after a perfect eighth inning by setup man Wade Davis. Which followed a fine seven innings by starter James Shields.
It was Davis who got the victory, his sixth, not Shields.
"I don't really care about wins, as long as the team wins," Shields said." My main focus is to go to the playoffs. So no matter what happens, I'm going to go out there and keep my team in the game and give us a chance to win every night. And to be able to hand the ball off to them in the eighth and ninth inning -- they're one of the best [tandems] in the game."
Davis has given up just one run in his last 32 1/3 innings. Holland has converted 26 of 27 save opportunities, including 19 in a row.
Shields had a short-lived 1-0 lead when the Royals scored a first-inning run off left-hander Jose Quintana on Lorenzo Cain's game-opening double, Omar Infante's sacrifice bunt and Hosmer's sacrifice fly.
But Shields immediately gave up a run in the White Sox half on Jose Abreu's two-out double and Adam Dunn's single. After that, Shields notched six scoreless innings with seven strikeouts.
"[Shields] gave us everything he had," Yost said. "At the end of the seventh inning, he was worn out."
The two victories at the end of this Boston-Chicago trip sent the Royals home in good spirits.
"I think it was real big, especially the way we started out in Boston," Shields said. "To get two out of three here in Chicago was big for us to go home and have some confidence."
This was the Royals' 100th game of the season, and they now stand 50-50. They're seven games behind first-place Detroit in the American League Central.
"We didn't have a good series against Detroit [1-3], then we had the break and we didn't have a good series against Boston [0-3]," Yost said.
"But you can't lose faith, you can't start panicking, you can't think the ship is sinking. You've got to stay positive, because these guys have the ability to fight through it, get themselves out of it, and get back on a roll. You've got to always remember that."