Hammel also got some help from manager Joe Maddon, who employed a couple key defensive shifts.
"Today, I got a little taste of Joe's shifts because we had Starlin [Castro] up the middle on a hard-hit ball and Javy [Baez] made a great play to knock a ball down," Hammel said. "That's what I do is put the ball in play."
He wasn't worried about the early struggles.
"I have plenty of confidence in myself to get it done and be ready and today was a step towards that," he said.
The Cubs loaded the bases with two outs in the third as Dexter Fowler walked, Chris Denorfia singled and Anthony Rizzo was hit by a pitch. Danny Duffy then walked Castro to force in a run.
Alcides Escobar doubled to open the Royals' sixth against Jorge De Leon and scored one out later on Lorenzo Cain's double. But Miguel Montero led off the Chicago sixth with a double and pinch-runner Billy McKinney then scored on Junior Lake's single.
The Royals' Omar Infante, who has yet to play in the field because of discomfort with his right elbow, went 2-for-3.
Duffy went four innings, allowing three hits, one earned run and two walks while striking out five.
Both walks came with two out in the third inning.
"I liked how I did out there," Duffy said. "There were a couple of instances in the third inning when I started nibbling. With two outs, you got to bear down. I know that better than anyone else with all the two-out walks I've had in my career."
After the rough third inning, Duffy bounced back and put the Cubs down in order in the fourth.
"I was pretty pumped about that," he said. "I was pretty happy with my location. Slider was biting today."
The Royals nearly rallied in the late innings. Lane Adams had his first home run of the spring in the top of the eighth to make it 4-2. Jorge Bonifacio had an RBI single with two outs in the top of the ninth to cut the Cubs' lead to 4-3. Stephen Perakslis struck out Adams on three pitches to end the game.
Up next: Jake Arrieta makes his third spring start on Wednesday when the Cubs travel to Glendale to face the Dodgers. So far, Arrieta has given up one earned run over six innings in his two outings, sriking out five. Maddon indicated they will abandon the designated hitter from now on. The game will be broadcast live on MLB.TV with first pitch scheduled for 3:05 p.m. CT.