Javier Hernandez joined Bundesliga side Bayer Leverkusen after spells at Old Trafford and the Santiago Bernabeu, and has a £13 million release clause.
The east London side held talks with the Mexican earlier this month, Slaven Bilic eager to strengthen his attacking options by signing at least one forward this summer.
The Hammers have reached an agreement to pay the 29-year-old's release clause in order to bring him to the London Stadium.
Hernandez would follow the signings of Pablo Zabaleta and Joe Hart from City, as well as Marco Arnautovic, who is set to undergo a medical in the coming days.