The Hammers kicked off this vital fixture in fine fashion with a goal to Demba Ba in the 13th minute before he grabbed a second in the 26th to give the visitors a nice buffer going into the break.
The match was just as vital for the Latics as it was for West Ham and they went about pushing for survival when Charles N'Zogbia delivered with a fine free-kick in the 57th minute and then Conor Sammon tied it up with his maiden Wigan goal with just over 20 minutes remaining.
As the match looked headed for a 2-2 draw, N'Zogbia produced the devastating hammer blow for Avram Grant and his men in injury time with his second which will be the goal that West Ham fans will want to forget as it secured their fate of playing second tier football next term for just the fourth time since the inception of the Premier League in 1992.
Wigan can still stay up with a win or draw against Stoke City next Sunday. A victory would almost ensure their Premier League status while a draw, depending on the results of the Blackpool and Birmingham City matches, may also be enough.
Venue: DW Stadium, Wigan Crowd: 22,043 Referee: Mike Dean Yellow cards:WA - Charles N'Zogbia 78' WHU - Scott Parker 80'
The bottom two teams both started in bright fashion with a few early chances but the visitors were more efficient with a goal in the 13th minute. GOALThomas Hitzlsperger was the architect after two crossed attempts were blocked by Wigan defenders but this time he managed to get the ball clearly into the direction of Demba Ba who rose above to power home a header, keeping his club's slim survival hopes alive.
Wigan were very quick to look for a leveler with two chances to Charles N'Zogbia coming in the ensuing minutes but they then found themselves two goals down when Ba struck again in the 26th minute. GOAL The Frenchman used his head for the second time when Hitzlsperger's cross from the left found James Tomkins who headed it across to an accepting Ba for a close range finish, making it 2-0.
Minutes later, Wigan had a great chance to get one back when Emmerson Boyce was about to fire home but Jack Collision intervened to produce a goal-saving block and then Hugo Rodallega almost came up with a spectacular overhead volley but he could not quite beat Robert Green in Hammers' goal.
As the Latics started to get into the game, Green was coming up with all the answers, blocking everything that came at him to keep his side two goals ahead at the break.
Wigan enjoyed plenty of possession early in the second half and it was to their advantage as they managed to get a goal back in the 57th minute. GOAL Charles N'Zogbia won a free-kick for his side just outside the area and the Frenchman did the job with a fine set piece shot which curled into the top corner to set up an enthralling final half hour.
The game really opened up with chances at both end, the first coming to Ba, who was close to his hat-trick after playing a one-two with Hitzlsperger but he was unable to beat Ali Al Habsi before Wigan grabbed a vital equaliser in the 68th minute.
GOAL Half-time substitute Conor Sammon grabbed his first Wigan goal when he received a through ball from Ben Watson, took a nice first touch, and then fired home to keep his side's survival hopes well and truly alive.
West Ham looked demoralized after conceding their second goal and it seemed as Wigan may run away with it. GOAL That did occur in injury time when N'Zogbia twisted and turned in the area before slotting underneath Green to send the East London down to the Championship and putting the Latics equal on points with Blackpool and Birmingham City ahead of the final weekend of the season.
Wigan Ali Al Habsi (gk) - Antolin Alcaraz, Gary Caldwell, Emmerson Boyce, Maynor Figueroa - Ben Watson, Mohamed Diame, James McCarthy (Sammon 46') - Tom Cleverley (Moses 46'), Hugo Rodallega (McArthur 90'), Charles N'Zogbia
Subs - Chris Kirkland (gk), Victor Moses (46'), Conor Sammon (46'), James McArthur (90'), Steve Gohouri, Franco Di Santo, Jordi Gomez
West Ham Robert Green (gk) - Jordan Spence, Danny Gabbidon, James Tomkins, Wayne Bridge - Jonathan Spector (Parker 62'), Thomas Hitzlsperger, Jack Collison (Keane 84') - Zavon Hines, Demba Ba, Frederic Piquionne (Cole 75')