Milan chief executive Adriano Galliani was overjoyed to re-sign the 31-year-old Ukrainian international, who spent seven successful seasons at the San Sire.
"After a series of frantic phone calls during the day today, we have reached an agreement with Chelsea," he told Milan Channel.
"Andriy returns to the Rossoneri, tomorrow he will be in Milan, Monday he will undergo a medical, then he will sign a contract and from Tuesday he will be available to Carlo Ancelotti.
"We succeeded in bringing home the player who in the last 50 years has scored the most goals in our shirt.
"President (Silvio) Berlusconi and I am happy, as is our coach and I believe also our players.
"I believe that Milan are the only club in the world to have three European players of the year in our squad."
Galliani added: "Andriy has returned home and I am happy about it. I am a Milan fan and I am very happy. "I've spoken to Andriy 48 times in the past three hours...the terms of the agreement are very private.
"Between today and tomorrow Andriy will be at Milan and he will start again his life as a Milan player.
"Andriy made a mistake in leaving and I believe that in the past two years he has realised that this is his home.
"Now he has made his financial sacrifices but at this point the only thing that matters is that he returns to us."