Cain has not pitched since July 9 due to the injury to his throwing arm. The procedure will remove bone chips from the elbow and he is expected to be ready for Spring Training.
The news is the crushing final blow in what has been a tough campaign for the 29-year-old, who finishes the year with a 2-7 record and a 4.18 ERA.
Cain has played his entire career with the Giants, beginning in 2005. A three-time All Star and two-time World Series champion, Cain tossed the first perfect game for a San Francisco Giants pitcher in 2012.
He is currently in the fifth year of an eight-year, $139.75 million contract that also includes a club option for 2018.
(Writing by Jahmal Corner in Los Angeles; Editing by Peter Rutherford)