Hazard who won the Europa League last season with the London side for Santiago Bernabeu for a reported fee of £88m which could rise to £130m.
The Belgian, 28, also signed a five-year contract with the Los Blancos until 2024.
In a message, he noted that he gave his best to the side and said the move was to live his dream.
"Now the Clubs have reached an agreement. I hope you understand I had to pursue my next chapter, just as each and every one of you should when you have the chance to pursue your dream. "