The 34-year-old arrives at the Riverside having been released by Manchester United at the expiration of his contract at the end of June.
He played just two games for the Red Devils in that 18-month spell at Old Trafford, whilst also spending an eight-game loan spell at Standard Liege last season.
Prior to his move to Manchester, Valdes established his reptuation as one of the best goalkeepers in the world as part of Pep Guardiola’s Barcelona team, playing 530 times for his boyhood club.
He won six La Liga titles with the club he joined as a nine-year old, as well as three Champions Leagues, two Copa del Reys, and two Club World Cups.
Speaking following the announcement of the deal, Boro boss Aitor Karanka said: “You can’t imagine how delighted I am because it’s not usual to bring players like him to recently promoted teams.
“I’m really pleased because he is really committed. All the the conversations we’ve had he knows why he is here and he is coming to add to what we have.
“He knows how strong this group is. It’s a privilege for us to be able to bring a player like this to the club.”