The 33-year-old right-back left Real this summer after his contract with the club was cancelled a year early.
“I had a chance to come to Chelsea but I was lucky too because my team was Real Madrid,” he told the Blackburn website.
“I love the club, I was there 10 years – it is a lifetime. I am proud of playing for them for so long.
“Now I want to enjoy the next two years, playing in the Premier League. It is one of the best in the world.
“Not only that it is pure football – fantastic games and a fantastic atmosphere. This will be a good experience for me, my wife and children. I have joined a historic club.”