The procedure aimed to address a re-aggravation of an injury Stocco sustained in 2003.
"We're hopeful to have John available to us for most, if not all, of our games this season," head coach Bret Bielema said. "Our physicians, in conjunction with John, felt it was best to get this addressed now."
Stocco added: "In order for me to have the most productive senior season possible, I felt this surgery was the best decision I could make at this point in time."
Wisconsin was 19-6 with Stocco as its starting quarterback the past two seasons. The Richfield, Minn., native set school records for passing yards (2,920), TD passes (21), pass completions (197) and total offensive yards (2,888) last season.
Wisconsin opens the season on Sept. 2 when it faces Bowling Green at Cleveland Browns Stadium.