The 28-year-old will be presented as a Real player on 13 June, subject to passing a medical at the Bernabeu.
Hazard scored 110 goals in 352 games for Chelsea after joining from Lille in 2012, and scored twice as they won the Europa League final last week.
"The memories he leaves us with will not fade," said Chelsea director Marina Granovskaia.
"He provided all who watched Chelsea play with great entertainment and many match-winning contributions, and for that we thank Eden enormously.
"He has been a model professional throughout his time at the club, a wonderful individual to have around and a joy to work with."
Signup for FREE news updates, latest information and hottest gists everyday/Advertise on NigerianEye.com