The 23-year-old would stay at Old Trafford until the end of the 2015-2016 season, announced United on Monday, after the team suffering a humiliating 6-1 defeat to Manchester City on Sunday.
Hernandez joined United from his hometown club of Chivas de Guadalajara in Mexico in July 2010. Since then, he has made 55 appearances for United and score 23 goals.
United manager Alex Ferguson said, "The last player I remember making an impact as big and as quickly as Javier is Ole Gunnar Solskjaer and he reminds me of Ole a lot.
"His talent for creating space in the box and his finishing ability mark him out as a natural goalscorer. Off the pitch, he is a pleasure to manage. He works very hard and is a popular member of the squad."