The deal is said to be worth around £35m with Croatia international Mateo Kovacic joining the Blues on a season-long loan as part of the agreement.
The Belgium goalkeeper spent seven years at Chelsea but his first three were on-loan at Real’s city rivals Atletico.
Courtois had one year left on his deal at Stamford Bridge but spoke of his desire to return to Spain to be closer to his two children.
After completing his medical, the 26-year-old was presented to the media at Real Madrid’s Bernabeu.
He said: “Today I am realising a dream. This is the best club in the world.
“Since childhood I dreamed that this moment could happen. Today I’m one of you. I’m a more Madrid. Hala Madrid.”
Courtois won two Premier League titles, one FA Cup and one League Cup during his time at Stamford Bridge.