(CNN) -- AC Milan coach Carlo Ancelotti confirmed he will be leaving the Serie A giants after their 2-0 win over Fiorentina in the final match of the Italian season.
Ancelotti spent eight years at AC Milan and has been linked with Chelsea.
Ancelotti, widely reported to be heading to Chelsea as a replacement for Guus Hiddink, will be replaced at the San Siro by former Brazilian international Leonardo.
Milan vice-president Adriano Galliani confirmed his appointment after seeing the Rossoneri clinch an automatic qualifying spot for next season's Champions League.
"Leonardo is our new coach and will be presented at the San Siro tomorrow at midday," he told Press Association.
Ancelotti would not be drawn on where his future lies after his lengthy and successful reign at Milan.
"Today is not the day for that," he said.
"I have had eight great years here and I want to thank everybody who has been with me over these years.
"That is all I can say today."
The 49-year-old Ancelotti did reveal that he would not be joining another Serie A club, increasing the chances he will be headed for FA Cup winners Chelsea.
Ancelotti was named Milan coach in November 2001 after a spell at Juventus and led them to one Serie A title and two Champions League triumphs.
Leonardo, like Ancelotti, is also another former Milan player and has been part of the club's technical staff since early this year.
He will take over a club sporting some of the biggest names in football, including Kaka, David Beckham and Ronaldinho.
The developments come on the day that Milan legend Paolo Maldini retired after 24 seasons and 902 games.