"I can't picture myself putting a different uniform on," Cain said upon announcing his retirement at a press conference on Wednesday (via Pavlovic).
The 32-year-old Cain has spent his entire MLB career with the Giants, who drafted him out of high school with the 25th overall pick in 2002.
Cain made his MLB debut at the age of 20 on Aug. 29, 2005, against the Colorado Rockies. He was one of the most valuable pitchers in the National League from 2007-12, trailing only Tim Lincecum (27.1) and Cole Hamels (25.5) with 23.9 FanGraphs wins above replacement.
During that same six-year stretch, Cain never threw fewer than 200 innings, was named to the NL All-Star team three times and finished in the top 10 of NL Cy Young voting twice. He threw a perfect game against the Houston Astros on June 13, 2012.
Cain also won three World Series titles with the Giants in 2010, 2012 and 2014.