Hernandez, who is Mexico’s all-time leading goalscorer, netted 17 times in 63 appearances in all competitions during his two years as a West Ham player.
The transfer marks a return to Spain after the 31-year-old spent the 2014/15 season loan with Real Madrid, and he will be an important addition to the Sevilla squad following the summer departures of Wissam Ben Yedder, Luis Muriel and the end of Andre Silva’s loan.
Sevilla have also brought in Israeli international Moanes Dabour and prolific Dutchman Luuk de Jong since the end of last season to bolster their attack.
Hernandez famously made his name in Europe after joining Manchester United from Guadalajara in 2010 and was a two-time Premier League champion. He left English football on a permanent deal to Bayer Leverkusen in 2015 and enjoyed two good years in Germany.
He arrived back in England in 2017 when West Ham paid around £16m for his services.
Hernandez, who took over the Hammers’ vacant number nine shirt just this summer, leaves record signing Sebastien Haller as the club’s main striker.
Young summer signings Albian Ajeti and Xande Silva, as well as winger Andriy Yarmolenko, back from long-term injury, are the only other recognised forwards in the first team squad.
A statement from West Ham read, “The club would like to thank Chicharito for his contribution and wish him all the best in his future career.”