Wigan ended a run of six Barclays Premier League games without a win with their first home victory of the season as goals from Ivan Ramis and James McArthur downed West Ham 2-1.
The visitors went into the match in much the better form but were behind in the eighth minute courtesy of a fine finish from centre-back Ramis.
McArthur doubled Wigan's advantage with his first goal of the season just after the break, and James Tomkins' injury-time header came too late for the Hammers.
Andy Carroll is yet to score for West Ham but he was the central figure in the opening moments as Wigan struggled to cope with the power of the striker.
They just about stood firm, though, and it was the hosts who took the lead in fine style in the eighth minute when defender Ramis met Jean Beausejour's corner with a perfect volley that flew past Jussi Jaaskelainen.
The Spaniard's only previous goal for the Latics came in their Capital One Cup win over the Hammers last month, but they had not learned their lesson and left him all alone.
Ramis was then booked for a foul on Wigan old boy Mohamed Diame 25 yards out but Mark Noble curled his free-kick into the wall, while down the other end Jaaskelainen needed to be alert to push away a fierce strike from James McCarthy.
Wigan were enjoying themselves and Carroll was called upon in defence in the 31st minute, heading away from just in front of the post as Beausejour let fly.
West Ham had offered little since their initial flurry but they broke down the other end and Matt Jarvis bent in a cross that just eluded Yossi Benayoun and forced Ali Al Habsi to push the ball behind.
From the resulting corner, Jarvis and Winston Reid were both denied by last-gasp Wigan defending. The Latics looked vulnerable from set-pieces and James Collins would surely have scored had he made a better connection with Noble's free-kick.
It was the hosts who ended the first half better, though, with strikers Franco Di Santo and Arouna Kone causing problems, and they doubled their lead less than two minutes into the second half.
West Ham were the architects of their own downfall as a poor Jaaskelainen clearance was seized on by Wigan and Shaun Maloney teed up McArthur, who drilled in their second.
Hammers boss Sam Allardyce had sent on Modibo Maiga in place of Benayoun at the start of the half but they now faced a real uphill struggle.
And the new man did not help the cause when he was booked for diving on the edge of the Wigan area, a decision that delighted the home fans.
Carroll had seen little of the ball in the second half and he could not control a cross in front of goal, but he stayed on as Carlton Cole replaced Noble and Gary O'Neil came on for Diame.
The extra attackers did not seem to help West Ham, though, and it was Wigan who looked the more likely to score on the break as the visitors left gaps at the back.
The Hammers did almost break through in the 90th minute, however, Jarvis picked out Tomkins at the back post and his shot was deflected onto the bar by Gary Caldwell.
And two and a half minutes into injury time the defender did get on the scoresheet, heading in George McCartney's cross, but it was too late to affect the result as West Ham suffered only their third defeat of the season.