The Hammers confirmed Chicharito's switch via their official Twitter account on Monday:
The Mexico international rose to prominence at Manchester United, becoming a hugely popular figure at Old Trafford before his permanent departure to the Bundesliga in 2015.
Often used as a goalscoring substitute by iconic United manager Sir Alex Ferguson, Hernandez commanded a starting role at Leverkusen before returning to the Premier League.
The 29-year-old scored 34 goals for the German team in two seasons, per WhoScored.com, as he excelled in the Bundesliga and European competition.
Chicharito is the perfect signing for West Ham, and if they can create opportunities in the penalty area next season, the Mexican will find the back of the net on a regular basis.