"Chelsea FC have agreed terms for Andriy Shevchenko to return to AC Milan," the London club confirmed on their website.
"Details of the deal will remain confidential."
The 31-year-old Ukraine striker has been linked with a move back to the Rossoneri after two difficult seasons in England, during which he only scored nine Premier League goals in 47 appearances.
He will complete the switch subject to a medical, ending weeks of negotiations that were recently made public by the Italian club.
"After a series of frenetic phone calls during the whole day, we reached an agreement with Chelsea. Tomorrow he will be in Milan, Monday he will undergo a medical and then sign a contract," Galliani told Milan's television channel.
"We have managed to bring home a player who has scored the most goals in our shirt in the last 50 years."
Chelsea are expected to take a massive loss on the £30 million they paid for the player in 2006.
Shevchenko scored 182 goals in seven seasons for Milan and is widely regarded as a hero in the city.
Blues owner Roman Abramovich had previously wanted the former Dynamo Kiev hit-man to stay at Stamford Bridge, despite three separate managers failing to pick him as first-choice.
Milan have been looking for a striker after finding their options limited in attack.
Ronaldo is still recovering from a long-term injury, Alberto Gilardino has been sold to Fiorentina, Alex Pato is only 18 years old and Filippo Inzaghi is nearing the end of his career at the age of 35.
Shevchenko will provide competition for places along with Marco Borriello, who returned to the club after a successful loan spell at Genoa.