The Primera Division side announced they had reached an agreement to sell the 31-year-old international to the European champions but did not reveal the fee.
Milan confirmed the Brazil international had joined the club on their website.
Emerson joined Real Madrid from Juventus for an estimated fee of 16 million euros last year after the Italian side were punished with relegation following a match-fixing scandal.
Emerson's signing was made at the request of new coach Fabio Capello who had made the holding midfielder a key part of his plans at both Roma and Juve.
However, the notoriously hard-to-please Real Madrid fans quickly got on the player's back after a shaky start to the season and he struggled to settle at the Spanish giants.
The Spanish media accused him of not wanting to play at the Bernabeu in front of a critical Real crowd when Capello left him out of the starting line-up for several home matches.
But the Brazilian recovered form in the latter part of the season and ended the campaign on a high when Real overhauled arch-rivals Barcelona to take their first league title in four years.
With Real deciding to sack Capello at the end of the season, Emerson's future at the club was cast into doubt and new boss Bernd Schuster made it clear that he did not feature in his plans.