"AC Milan is pleased to announce the renewal of Zlatan Ibrahimovic's contract until June 30, 2023. The Swedish forward will continue to wear the number 11 shirt," the team said in a statement.
Ibrahimovic, who turns 41 in October, has signed a deal which will net him around one million euros in fixed salary, with large bonuses linked to appearances and achievements.
The Swede is out of action until at least early next year after having had the anterior cruciate ligament in his left knee reconstructed in May.
The former Inter Milan, Paris Saint-Germain and Manchester United forward said in May he endured six months of sleepless nights due to the pain in his knee because he was determined to fulfil his promise to AC Milan of delivering their first Serie A crown in 11 years.
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.
Ibrahimovic returned to Milan in January 2020 eight years after leaving and his arrival kick-started the rise of Stefano Pioli's team to the top of the Italian game.