The 27-year-old Valencia defender rejected the chance to join Napoli in favour of the Rossoneri, with whom he will begin 2014, according to his agent, Ernesto Bronzetti
The 27-year-old's future at Mestalla has been the subject of speculation after the France international was slapped with a one-week suspension without pay for publicly criticising coach Miroslav Djukic and team-mates.
And Bronzetti has confirmed that he has sealed an escape route for the defender, who snubbed interest from Napoli prior to agreeing to join the Rossoneri early in 2014.
He told Radio Kiss Kiss: "I have just concluded the transfer, so it is complete.
"The player will go to Milan despite recent interest from Rafa Benitez at Napoli. [Rami] was wanted by many clubs, but he chose the Rossoneri."
Reports emanating from Italy have suggested that a fee of €400,000 (£338,900) will be paid by Milan for the loan, while a further €7 million (£5.9m) would be required at the end of the season should the Italian giants wish to make the move permanent.
Rami, whose contract with Los Che runs until 2015, joined Valencia from Lille in 2011 and has subsequently made 93 appearances for the club.