Montoya will link up with former Valencia goalkeeper Mat Ryan and compete for a place with another of the La Liga club's ex-players, Bruno, subject to international clearance.
"Martin's pedigree is excellent, and I'm delighted we have been able to add a player of his standing to our squad," said manager Hughton. "There is no doubt he will improve our options in the right-back position.
"He's won several domestic and European honours in Spain and played the majority of his career in the top level of LaLiga.
"He has a wealth of experience, at 27 years old he is a very good age, and I'm now looking forward to working with him."