The defender, who fell out of favor 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 fallen out of favor at Mestalla after a public fall-out that involved him criticizing 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 as the wheels kicked into motion for his departure to San Siro. 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. He has 26 caps for the France national team since his 2010 debut.