Alexandre Pato will return to Brazil after AC Milan confirmed they had reached an agreement with recently-crowned Club World Cup champions Corinthians over the forward's transfer.
The 23-year-old has reportedly signed a four-year deal after revealing his desire to return to his homeland last month.
Milan confirmed Pato's departure, after five years at San Siro, in a brief statement on their website.
"AC Milan can announce that Alexandre Pato has been sold outright to Sporting Club Corinthians Paulista," the statement read.
Corinthians later confirmed a 15million euros deal (£12.2million) had been done, pending a medical.
The club have already handed Pato, whose face welcomed visitors to the club's website on Thursday night, the number seven jersey.
"In the coming days Pato, who will wear the number seven shirt with 'Timao', will undergo medical tests and sign a contract for four seasons," the statement read.
"Corinthians have bought 100% of the economic rights of Alexandre Pato for 15million euros."
Pato quickly established himself as a favourite at Milan after signing from Internacional in 2007, scoring nine goals in his first half-season and reaching double figures in each of the next three campaigns.
However, he scored only once in Serie A and four times altogether last season and has made only seven appearances in all competitions so far this term as injuries have hampered his progress.
Following his medical Pato is due to join up with his new team-mates, who have not played since their 1-0 Club World Cup final triumph over Chelsea last month, for pre-season training ahead of their match away to Paulista on January 20.
Pato thanked Milan for his time at the club in an open letter on the Rossoneri's website.
"I wish to salute and especially thank everyone," he said. "From the president to the many people I worked with in these unforgettable years at Milan.
"I am going to Brazil, to Corinthians, so I'll have the opportunity to play consistently. It will not, however, be easy to forget Milan.
"I will always be tied to this jersey, the club colours and all the Rossoneri fans. Above all at this moment my thoughts and my biggest thanks go to them."