The striker, who helped end Milan's 11-year wait for a Serie A title last weekend, is out of contract at the club in the summer.
- Zlatan exclusive: I'm worried about the future
A statement from AC Milan said: "AC Milan announces that Zlatan Ibrahimović underwent an operation on his left knee carried out by Dr Bertrand Sonnery-Cottet, with the Club's Medical Director Stefano Mazzoni in attendance, at the Hôpital Jean Mermoz in Lyon.
"The arthroscopy had been planned for a while to definitively resolve the joint's instability through the reconstruction of the anterior cruciate ligament, with lateral reinforcement and meniscus reparation.
"The operation was a complete success and the prognosis is estimated between 7 and 8 months."
Speaking to ESPN earlier this month, the 40-year-old admitted he was worried for the future that will follow an illustrious career.
"I'm in a situation now where I'm close to the goal line ... so I'm a little bit panicking," he said.
"Because when it stops, what do you do? I know I can do a lot of things, I will have offers from all over the place. But the adrenaline I get on the field, I will never get that [from] something else."
Ibrahimovic has won numerous titles and cups and represented some of the world's biggest clubs across a 23-year career. In addition to his three Serie A triumphs across two spells with AC Milan, he won the league three times with rivals Inter.
Starting his career at Ajax, he won the Eredivisie title twice, and after spells in Italy with Juventus and Inter, he won LaLiga with Barcelona. The former Sweden international won four Ligue 1 titles at Paris Saint-Germain as well as the Europa League at Manchester United.
Ibrahimovic also played for the LA Galaxy in Major League Soccer in 2020 and, speaking to ESPN's Gab & Juls Show, did not rule out a return to MLS in the future -- even hinting that he could follow in Inter Miami owner David Beckham's path and create his own franchise.
"You never know -- maybe one day I'll come back," Ibrahimovic said. "So to show them how, to give them a reminder what real football is.
"So it's for two years. They get to see what real football is, and I think they will never see something like that before. Maybe I come back and have my own club -- you'll never know."