Through May 3, 2015, Lincecum posted a 2–2 record, a 2.40 ERA, 20 strikeouts, and 11 walks in 30 innings pitched. He threw eight shutout innings in a victory over the Los Angeles Angels on May 3, then struck out eight over six shutout innings in a win over the Miami Marlins on May 8. On May 20, in a 4–0 win over the Dodgers, Lincecum pitched seven shutout innings and passed Hall of Famer Carl Hubbell for fourth place in franchise history on the Giants all-time career strikeouts list. On June 27, Lincecum was hit in his pitching elbow with a line drive off the bat of DJ LeMahieu and left the game with an injury. He was diagnosed with a degenerative condition in both hips in July and was given cortisone shots. Still not having pitched since June 27, Lincecum underwent season-ending hip surgery on September 3. For the season, he was 7–4 with a 4.13 ERA and 60 strikeouts.