The defender, who fell out of favour with los Che in recent weeks, has made the move to San Siro for at least the remainder of the 2013-14 campaign
The France international had become out of favour at Mestalla after a public fall-out that involved him criticising coach Miroslav Djukic and he will not play again for the Spanish side this season.
Los Che endured a poor start to the season - with four consecutive defeats - and Rami lashed out on Spanish radio, to which the club responded by removing him from the first team.
Valencia then suspended the 27-year-old without pay for a week for his actions as the wheels kicked into motion for his departure to San Siro, and he is already training with the Rossoneri but cannot play for the first team until January.
Rami joined Valencia from Lille in 2011 having spent roughly five years at the Ligue 1 club and he has 26 caps for les Bleus since his 2010 debut.