After walking Coco Crisp to open the game, Lincecum struck out the next two batters, which brought up Cespedes. He crushed an 0-1 pitch deep into the left-field picnic area for his third spring homer in his last 11 games. Since beginning the Cactus League season 0-for-11, Cespedes has hit .333 (11-for-33).
"It was just a spinning slider. It didn't break," Lincecum said of the delivery that Cespedes mashed.
Eric Sogard's second-inning RBI single widened the A's lead to 3-1 before they pulled away with three runs in the fourth.
Lincecum vanished after Sogard and Milone singled to open the inning. Oakland scored its next two runs on Dan Runzler's wild pitch and Posey's passed ball. Seth Smith's two-out single off Shane Loux generated the inning's final run.
Two of the Cactus League's most torrid hitters stayed hot. San Francisco's Brandon Belt, who has an outside chance of winning the Cactus League's Triple Crown, homered in three at-bats and is batting .588 (10-for-17) with eight RBIs in his last five games. Sogard, who homered in the fifth inning, went 3-for-3 with a walk to raise his spring average to .538 and keep his name in the mix for the second-base job. He is batting .714 (15-for-21) in his last nine games.
"He's certainly right in the middle of the mix," Melvin said. "He was always in there and probably came out of the pack a little bit, but he's a guy that's played for us before, comes to camp trying to win a job and he's doing everything he can to do that."
Giants rookie Nick Noonan, contending for a utility infielder's job, singled to drive in a fourth-inning run. Cole Gillespie, a candidate for a backup outfielder's role, homered in the seventh for the Giants. Guillermo Quiroz, who could be San Francisco's reserve catcher if Hector Sanchez is unable to start the season, hit an RBI double in the ninth.
Oakland's Adam Rosales added a two-run homer in a five-run eighth inning.
Up next: The A's will host the Dodgers on Sunday, with right-hander A.J. Griffin getting the start at Phoenix Municipal Stadium beginning at 1:05 p.m. PT. Lefty Josh Beckett will start for Los Angeles. Griffin, penciled in as the A's No. 4 starter, had pitched extremely well up until his last start, when he was tagged for five runs on six hits in 5 1/3 innings against the Mariners.