The 32-year-old passed a medical and has agreed to personal terms with the Spanish side.
He said: “I’ve wanted to come here for a long time.
“Mourinho is a winning manager and I have come to a winning club.”
“The speed of the game is different here to England, where the game is quicker,” he added.
“I think it was harder for me to adapt to English football than it will for me to adapt to the Spanish game because it is so similar to the Portuguese league.”
“I have spoken with Mourinho about my role as a senior player here on the pitch.
“A lot of important players have left this year.
“I want to help Madrid win as much as I can.”