Both clubs have confirmed the Italy striker has concluded the formalities of the reported £19million switch and signed a four-and-a-half year contract.
The deal brings to an end an extraordinary spell at City in which Balotelli attracted as many headlines for off-field controversies as for his performances on it.
The 22-year-old, who has already been pictured in Rossoneri colours after a chaotic arrival back in his homeland, will officially be presented as a Milan player on Friday evening.
Balotelli missed City’s game at QPR on Tuesday after a price was agreed with Milan which, rising to £22million, leaves the English champions just short of the £24million they paid Inter Milan for him in 2010.
The news sparked huge interest in Italy and Balotelli was swamped by reporters, photographers and fans as he arrived at a clinic in Milan to undergo his medical on Wednesday.
There were also reports of police being called to disperse unruly crowds outside a restaurant where he met club officials.
Balotelli returned to the club’s offices this morning to formally sign the deal.
A statement read: "AC Milan announces that it has acquired from Manchester City Mario Balotelli, who has signed a contract until June 30, 2017."
Balotelli made a huge impression at City – not always for footballing reasons – but he played key roles in the FA Cup win of 2011 and last year’s title success.
He told City’s website: "For sure I will remember my brilliant team-mates, the manager and all the supporters.
"They are the best, they were great with me and I will always have a very special place in my heart for City, it’s a great club with a great future.
"I thank them for all of their support of me. Maybe one day we will see each other again.”
Balotelli had been linked with Milan throughout the month but City continually played down the prospect of him leaving.
But with senior figures at Milan continuing to discuss the possibility of a deal, rumours of his departure continued.
Eventually, Milan’s interest proved tempting for all parties.
Balotelli paid tribute to City manager Roberto Mancini as he left.
Mancini was often heavily critical of his fellow Italian but, ultimately, was fiercely loyal and forgave him for many of his indiscretions.
Balotelli said: "Yes, I said goodbye to everyone at the meal in London before the game at QPR. It was very emotional for me. I spoke with Roberto before I went to speak to the players. We spoke for some time about lots of things. He was sad, and I was too.
"But it was a good conversation. I love Roberto, he has been very important for my career, and I will always thank him for having trust and faith in me.
"Being at City was an important part of my life and career. I needed to grow up like a player and as a person and it has been a very good experience for me."
Balotelli scored 30 goals in 80 appearances for City and his contribution to their success was not insignificant, but he will be equally well remembered for four red cards, clashes with team-mates, brushes with discipline and other misdemeanours.
He never regained a starting place after a dismal performance in the derby defeat by Manchester United on December 9 through a combination of illness and selection issues.
There then followed a high-profile challenge to a club fine for indiscipline, which he later dropped, and a much-publicised training-ground fight with Mancini.
Mancini promised to give the player "another 100 chances” after that but less than four weeks later his time at the club has come to an end.
Balotelli said: "I will always be interested in Manchester City and their fortunes. I really hope that City can win the league again this year and beat United. I think there are great players at the club and a great manager too. The club will be very successful in the future and that makes me happy.”