Wayne Rooney and Fabio Da Silva also had goals as United moved four points ahead of Arsenal with 11 games remaining in the season.
Wolverhampton climbed out of the three relegation places at the bottom of the standings by beating 10-man Blackpool 4-0, Aston Villa defeated Blackburn 4-1, Everton beat Sunderland 2-0 and Newcastle drew 1-1 with Bolton.
Manchester United opened a series of three road matches with the win at Wigan. The Red Devils visit Chelsea in three days and are at Liverpool on March 6.
The league leader took a 1-0 lead in the 17th minute as Nani ran onto a pass from Rooney in the area and crossed to Hernandez, who tapped the ball past goalkeeper Ali Al Habsi.
United goalkeeper Edwin van der Sar, who earlier saved a shot from Victor Moses, then denied James McCarthy from close range less than a minute later.
United broke the game open with three goals in 13 minutes late in the second half.
Hernandez doubled the lead in the 74th minute off a pass from Rooney, who scored 10 minutes later. Fabio then made it 4-0 in the 87th minute.
Wigan drops to 19th in the 20-team league with 27 points, two more than West Ham. The Latics have allowed 30 goals in 15 home matches this season, the most in the league.
Sylvan Ebanks-Blake scored two goals and Matt Jarvis and Jamie O’Hara had one each as Wolverhampton moved from last place to out of the relegation zone.
Wolves, which scored three times in the second half after Blackpool’s D.J. Campbell received a red card just before halftime, have 28 points and are above West Brom in the final relegation spot on goal difference.
Ashley Young scored twice as Aston Villa beat Blackburn to end a three-game winless run. Jermaine Beckford had both goals for Everton, which is undefeated in its last 13 games against Sunderland.
Daniel Sturridge’s 38th minute goal earned Bolton the away draw at 10-man Newcastle, which got a reply from Kevin Nolan. Ryan Taylor was sent off for the Magpies in the 54th minute for a two-footed tackle on Johan Elmander.
Liverpool is at West Ham and Manchester City hosts Fulham tomorrow, while West Brom visits Stoke in two days.
Arsenal also faces Birmingham in the Carling Cup final tomorrow at Wembley Stadium in London.