The former Guadalajara star put United ahead in the 27th minute of the clash at Britannia Stadium with a brilliant piece of finishing with the back of his head.
Stoke hit back nine minutes from time when Tuncay Sanli produced a stunning finish to complete a swift movement from the Potters but Hernandez was on hand to stab home a mishit Patrice Evra shot four minutes later to send United third as the home side remained 13th.
Venue: Britannia Stadium, Stoke-on-Trent Crowd: 27,372 Referee: Andre Marriner Yellow cards:SC - Danny Collins 50', Marc Wilson 66' MU - Gary Nevill 35', Paul Scholes 40'
SC Thomas Sorensen (gk), Abdoulaye Faye, Ryan Shawcross, Danny Collins (Higginbotham 57'), Robert Huth, Rory Delap, Marc Wilson, Jermaine Pennant (Gudjohnsen 79'), Matthew Etherington, Kenwyne Jones, Jonathan Walters (Tuncay 66')
Subs - Asmir Begovic (gk), Danny Higginbotham (57'), Tuncay Sanli (66'), Eidur Gudjohnsen (79'), Glenn Whelan, Andy Wilkinson, Danny Pugh
MU Edwin van der Sar (gk), Nemanja Vidic, Rio Ferdinand, John O'Shea (Carrick 70'), Gary Neville (Brown 46'), Paul Scholes (Obertan 87'), Darren Fletcher, Patrice Evra, Nani, Javier Hernandez, Dimitar Berbatov