Cain struggled for the remainder of the season before being sidelined due to elbow difficulties in July, pitching his last game of the season on July 9, 2014. He ended the season with a 2–7 record and a 4.18 ERA. Before undergoing surgery on his right elbow to remove bone chips on August 11, Cain revealed that he had pitched through bone chips for ten years, but that they had never been an issue until then. In late September, Cain underwent surgery on his right ankle to remove a bone spur. The Giants acquired Jake Peavy a few days before the trade deadline to fill in as a starting pitcher and went on to win the 2014 World Series.