In 2010, Cain was part of a rotation that included 2008 and 2009 NL Cy Young Award winner Lincecum, 2002 American League Cy Young Award winner Barry Zito, Jonathan Sánchez, and Wellemeyer (who was replaced midseason by Madison Bumgarner). On May 22, Cain threw a complete game and allowed just one run but was charged with the loss as Oakland defeated the Giants 1–0. In his next start, on May 28, Cain shut out the Diamondbacks, allowing one hit (a double by Mark Reynolds) as the Giants won 5–0. In the month of May, Cain pitched into the sixth inning or later in all six of his starts while giving up nine earned runs on 23 hits with 35 strikeouts and 18 walks in innings pitched with an overall record of 3–3 and a 1.81 earned run average. On August 1, for the first time in his career, Cain defeated the Los Angeles Dodgers by throwing scoreless innings in a 2–0 victory. He took a no-hitter into the eighth inning on September 26 against Colorado before finally allowing a one-out single to Jay Payton; Cain wound up allowing two runs while throwing a complete game in a 4–2 victory over the Rockies.