The 27-year-old is said to have completed a medical over the weekend after a fee reportedly between £6million and £7m was agreed between the clubs.
West Ham have now ratified the deal, allowing Valencia to head to Mexico to begin training with his new team-mates.
The Ecuador international joined the Premier League club in 2014 after impressing for Pachuca in Liga MX.
His time in England was blighted by injuries, however, and he only scored 10 times in 72 appearances for the Hammers.
Valencia was loaned to Everton last season, for whom he scored three times in 23 games.