West Ham substitute Brian Deane's last-gasp goal cost Wigan a play-off place.
Neil Roberts first-half goal looked to have revived Wigan's season, but in the 90th minute Deane nodded in at the far post from Michael Carrick's free-kick.
Roberts had given Wigan hope of making the play-offs with his first goal since August after West Ham failed to clear a Nathan Ellington cross.
In the second-half Marlon Harewood and Bobby Zamora had chances cleared off the line, before Deane popped up.
With so much to play for Wigan started with greater impetus than West Ham.
On four minutes, a Neil Roberts flick sent Gary Teale wide into space, but Nathan
Ellington could only shoot at Stephen Bywater following a low cross
The Hammers goalkeeper was also at full stretch to keep out a long-range effort
from Jimmy Bullard.
Soon after Bullard came close to capitalising on a mix-up between Bywater and
With Wigan so dominant Bobby Zamora and Marlon Harewood were virtual spectators.
However on 27 minutes, Harewood did glimpse the goal, only to shoot straight at
John Filan from close range after Don Hutchison had flicked on a long Steve
It proved an all too brief reprieve for the visitors.
Following a quick Alan Mahon break, West Ham failed to clear after
Ellington's shot was blocked and Roberts fired home at the far post.
West Ham provided more of an attacking threat after the restart and Jason de Vos did ever so well to block a Zamora shot on the line when a goal looked certain.
Just after the hour Nicky Eaden rescued Wigan again, clearing off the line from a Harewood header.
Harewood and Zamora were soon combining again and Filan did well to gather a shot from the former Tottenham striker.
West Ham manager Alan Pardew then threw on Deane and the veteran striker came to the visitors' rescue in the last minute.
Carrick crossed to the far post and Deane rose to guide his header past Filan.
If Wigan had held on, Crystal Palace's defeat at Coventry, would have propelled Paul Jewell's side into the play-offs.
Wigan: Filan, Eaden, Breckin, De Vos, Baines, Teale, Bullard,
Farrelly (Jarrett 71), Mahon (McMillan 71), Ellington,
Neil Roberts (Liddell 85).
Subs Not Used: Walsh, Mitchell.
West Ham: Bywater, Ferdinand, Dailly, Melville, Mullins,
Etherington (Reo-Coker 84), Carrick, Lomas,
Hutchison (Connolly 56), Zamora (Deane 73), Harewood.
Subs Not Used: Srnicek, Repka.
Referee: R Pearson (Co Durham).