After Shields finished his work, Aaron Crow pitched a scoreless seventh and Wade Davis a perfect eighth. Greg Holland got through a tense ninth inning to get his 18th save.
"It was a gutty effort all the way around," Crow said. "Shields pitched a great game and when he pitches like he did today, that's all you're going to need."
The victory was the Royals' seventh in their last 11 games.
"Our pitching today was clutch," manager Ned Yost said. "They were 1-for-17 with runners in scoring position. They had some opportunities. Shields had to grind it out again and navigate through some choppy waters, but he made huge pitches when he needed to."
The Royals got their only two runs off right-hander Hiroki Kuroda in the second inning after two were out. Salvador Perez singled and got all the way home on Lorenzo Cain's double that got by diving center fielder Jacoby Ellsbury. Mike Moustakas looped a single to left, scoring Cain.
Did Moustakas think that two-run lead would hold up?
"Honestly, no, because that's a good-hitting team over there, but when you've got Juego [Shields] on the mound, anything's possible," Moustakas said. "The way he was throwing the ball today, it was awesome to watch him pitch."
"That's what he does. Every time he pitches, he puts his heart on the mound and does anything he can to get us a 'W.'"
Shields kept the Yankees scoreless for the first five innings but it wasn't easy. They populated the bases with frequency but couldn't get a run home.
"It was a game of missed opportunities," Yankees captain Derek Jeter said.
"You give those guys credit, we've seen Shields for years now and he's as good as they come, especially with guys on base, he bears down. We got to find ways to score runs, especially when you have guys on third base and less than two outs."
The most perilous time came in the second inning when the Yankees loaded the bases with no outs. Yangervis Solarte and Ichiro Suzuki each singled and Brian Roberts walked.
However, Shields struck out Kelly Johnson, got Brett Gardner on a forceout at home and fanned Jeter.
"I pitched against them for about the 28th [actually 29th] time and they're always tough, so you've got to keep grinding," Shields said. "I'm not going to give in. I'm not going to give them a cookie, especially there in the second inning with the bases loaded."
The Yankees stranded seven runners in the first four innings before Shields finally got a 1-2-3 fifth. They scored one run in the sixth on Solarte's double, Perez's passed ball and Suzuki's groundout.
Shields left with a 2-1 lead, battling through six innings on 110 pitches. He gave up six hits and walked two with eight strikeouts.
Shortstop Alcides Escobar lent a helping hand, and arm. In the first inning, he went deep into the hole and dove to get Jeter's grounder and threw him out -- from his knees. In the fifth, Escobar ranged deep into left field and leaped to snag Ellsbury's looper.
So did first baseman Eric Hosmer, leaping high to catch Shields' errant lob in the first and making a backhanded stab of a grounder in the third. But Hosmer's biggest play came in the second inning when he caught Gardner's bouncer behind the bag and, ignoring the easy play at first, threw home for the forceout.
"A lot of first basemen would have just taken the out at first base -- it's early the game -- so Hoz made a great play there," Yost said. "It was probably a game-saving play for us."
Crow relieved Shields and gave up a one-out triple to Gardner for the potential tying run in the seventh. But he got Jeter to tap out and struck out Ellsbury.
"Striking out Ellsbury there was huge because he's been a hot hitter," Yost said.
Davis struck out Carlos Beltran for this 500th career strikeout to start the eighth, then added No. 501 and a groundout.
"Crow was huge, man," Davis said. "Crow really set up the rest of the game, getting out of that jam right there and not letting that run get in. He made great pitches to get out of it."
As for his milestone strikeout, Davis seemed unimpressed.
"I'm only 5,000 or 6,000 behind Nolan [Ryan]," he said.
Suzuki opened the Yankees' ninth by lining Holland's first pitch into left field. His second delivery went into the dirt and through Perez for a wild pitch that put Suzuki at second base. Roberts popped out and pinch-hitter Mark Teixeira grounded to first, Suzuki moving to third.
Gardner swung and missed a 3-2 pitch to end it.
"First pitch single, first pitch wild pitch and you've got a runner on second, but you still like what Holly brings to the table -- dynamic breaking ball and 97 mile-an-hour fastball," Yost said. "And nerves of a burglar."
So the Royals stole another one from the Yankees.
"Guys are scuffling, sometimes they scuffle in bunches," Jeter said. "We kept battling all the way up to the ninth inning, but that's not a bullpen you want to fall behind, they've got some guys in there that can bring it."