The 27-year-old spent three years at Manchester City before his departure in 2010.
"I'm absolutely delighted to be bringing in somebody of Javier's quality," Norwich manager Chris Hughton told the club's official website.
"It gives us real competition in the squad, and for me an important factor was the fact that he has played in the Premier League before.
"He has played in La Liga, Serie A, and the Premier League, so he is a player of real experience."
Norwich start the new season at Fulham on Saturday.