Lopez also insisted that he will look back fondly on his second spell at the Bernabeu.
"It was a very happy stage in my life and I can only thank Madrid. I am very pleased to be joining a club like Milan," Inside Spanish Football quotes the stopper as saying.
"I'll hold with me the good things I experienced. It's a sad moment, but you have to look at the positives. I'll have time to say my goodbyes to the madridismo, who deserve it. Will I return? It'll be difficult to go back to Real Madrid for a third time. Maybe one day as an employee.
"I'm ready to fight and work as hard as ever to earn a starting spot. Ancelotti spoke highly of Milan. It's one of the world's best clubs. Milan should be fighting for the Scudetto and going as far as they can in very competition."
Lopez had been Madrid's first-choice La Liga goalkeeper for the last two seasons.