Lopez, 32, has joined the Serie A club on a four-year deal while Armero will spend the 2014-15 season on loan from Udinese at the San Siro.
Statements published on Milan's official website confirmed both players had passed medicals on Wednesday before putting pen to paper on their respective contracts.
Lopez's future at Real appeared to be under threat when the European champions signed Costa Rican keeper Keylor Navas from Levante, and he has now opted to leave Spain for the first time in his career.
Having been attached to the capital club since 2000, he spent time with Villarreal and Sevilla before returning to the Bernabeu in January 2013.
He displaced Iker Casillas as first-choice keeper in Primera Division matches, but the World Cup winner was preferred in the Champions League and domestic cup competitions.
The 27-year-old Armero, who can play on the left side in midfield or defence, only rejoined Udinese from Napoli in June, and spent the second half of last season at West Ham.
"I'll be joining a great team," Armero told the Milan Channel. "I want to find my place here and do well."
Armero revealed he had spoken to current Milan defender Cristian Zapata and former Rossoneri player Mario Yepes, his international team-mates, before making the switch.
"Many of my friends like Cristian and Mario have spoken well of Milan," he added. "I'll work hard to do well for the team and for the fans who deserve it."
Milan have carried out something of a squad overhaul after last season's disappointing eighth-placed finish, signing keepers Lopez and Michael Agazzi, centre-halves Alex and Adil Rami, and forward Jeremy Menez.
Hopefully signings like this will help Milan improve on last season- shea666