Tim Hudson underwent surgery on his right ankle to remove bone spurs, CSNBayArea.com learned on Tuesday.
The 39-year old went under the knife last Friday in North Carolina.
Dr. Bob Anderson performed the procedure.
The estimated recovery is eight weeks.
"Tim started experiencing increased discomfort as he was ramping up his offseason workouts and we decided it was best to take care of this now so he doesn't have to deal with this during the upcoming season," Giants assistant GM and VP Bobby Evans said. "We expect Tim to be ready to go Opening Day."
Hudson broke the same ankle on July 24, 2013 when he was stepped on while covering first base.
He missed the remainder of that season, and signed a two-year, $23 million deal with the Giants in November 2013.
Over 31 starts for San Francisco in 2014, Hudson went 9-13 with a 3.57 ERA.
He went 0-1 with a 4.29 ERA in four postseason starts, with the Giants winning three of those games en route to their third World Series crown in five years.