The Mexico international, 27, was on the bench for Sunday's 2-1 defeat at Swansea City but has not started a Premier League match for a year. He has signed a three-year contract.
Meanwhile, United's Belgian midfielder Adnan Januzaj, 20, has joined Borussia Dortmund on loan.
Goalkeeper Anders Lindegaard, 31, has signed a two-year deal with West Brom.
Hernandez scored 59 goals in 156 appearances for United after joining from hometown club Chivas de Guadalajara in 2010.
He spent most of last season on loan at Real Madrid.
Januzaj has scored five goals in 60 United appearances.
He has started two of United's four league games this season, scoring the winner at Aston Villa on 14 August.
"Borussia Dortmund are a great club, the fans here are supposed to be really incredible. I want to achieve great things with the team," said Januzaj.
Denmark international Lindegaard, 31, has made 29 United appearances since joining in 2011.
Manchester United striker Javier Hernandez has joined Bayer Leverkusen for £7.3m.