In a statement, Milan said that the 40-year-old striker went under the knife in the French city of Lyon on Wednesday, an operation which the club said had been scheduled some time ago.
Ibrahimovic has missed large chunks of the past season with injuries, Milan relying on France forward Olivier Giroud in their charge to a first league title in 11 years.
After Sunday's 3-0 win at Sassuolo which decided the title in Milan's favour, Swede Ibrahimovic said he had to see how he was physically before he decided whether to carry on playing.
He had already missed Euro 2020 after surgery on his left knee last year before an Achilles tendon problem which cost him his starting position up front for Milan.
(For more sports news and updates, follow Ahram Online Sports on Twitter at @AO_Sports and on Facebook at AhramOnlineSports.)