The right-hander, who will be the Giants’ No. 2 starter behind left-hander Madison Bumgarner during the regular season, threw 59 pitches and struck out seven.
Pablo Sandoval’s two-run single in the fourth gave the Giants an early lead, but the Cubs scored a run in the sixth and two in the seventh.
The decisive run scored on two infield errors as part of the same play.
Cain is feeling much better about himself than he last year, when he was 8-10 in 30 starts.
“Last year, I gave up a lot of two-strike hits. I didn’t finish the hitter off for some reason,” Cain said. “Today, we were able to able to finish off the hitters.”
The entire starting staff appears to be more focused this spring with an eye on the regular season, which begins March 31 on the road against the Arizona Diamondbacks.
“I wouldn’t say we have really talked about it much, but we know what needs to be done,” Cain said.
Giants: Left fielder Michael Morse returned to the lineup after missing three games with a strained calf and had a hit. ... Right fielder Hunter Pence also had a double after dealing with a sore left elbow.
FORMER GIANTS SHINE
Left-hander Jonathan Sanchez, who pitched a no-hitter for San Francisco against the San Diego Padres in July of 2009, earned the save on Monday for the Cubs against his former team, his second save of the spring. The man who caught that no-hitter, Eli Whiteside, also is with the Cubs now and started Monday’s game.
Sandoval appears to be locked in at the plate for the Giants. He had two more hits, raising his spring average to .381.