Valencia joins Queretaro as a free agent after being released by LDU Quito.
The former United fullback returned to Ecuador and Quito last year in a celebrated move. However, his contract was terminated earlier this year due to the club's financial problems.
Valencia had been linked with a return to Europe - and England - over the summer.
But he will now extend his career in Mexico with Queretaro.