Mauro Boselli scored twice to help Wigan fight back and defeat fellow Premier League side West Ham in the Capital One Cup third round.
James McArthur's error let Modibo Maiga power in a shot for the Hammers.
Wigan responded with Boselli converting a Callum McManaman cross and Ivan Ramis scoring with a 20-yard strike.
Boselli lifted the ball over keeper Stephen Henderson for his second and Jordi Gomez scored from the spot to seal the win.
The defeat is West Ham's first at home this season and came after both sides made plenty of changes from last weekend's Premier League matches.
Hammers boss Sam Allardyce made nine changes to his side, while counterpart Roberto Martinez made seven.
Maiga was one of those to come in for the home side and he quickly made his presence felt.
McArthur was caught in possession by the Mali international, who fired into the bottom corner past keeper Ali Al-Habsi.
Boselli's cup of cheer
Mauro Boselli has yet to score in the Premier League since arriving at Wigan in 2010. The Argentinian striker, who has spent half a season on loan at Genoa and a year back at former club Estudiantes, has scored all four of his Wigan goals in the League Cup.
Wigan gradually improved, with David Jones having a shot saved by Stephen Henderson and Boselli heading wide.
Boselli has struggled since a £6m move to Wigan from Estudiantes in June 2010 but played a pivotal role in helping his side through to the last 16.
The Argentine, 27, lost his marker to get on the end of a Maynor Figueroa cross and poke the ball past Henderson for an equaliser.
West Ham allowed their visitors too much time and space and that was epitomised when Ramis scored his first Wigan goal.
The Latics centre-back ran on goal from the halfway line before finishing it off with a long range shot.
Boselli extended his side's lead with a lovely chip over Henderson as West Ham struggled to match their rivals.
The home side rarely looked like mounting a comeback and were put out of their misery when Gomez scored from the spot after Henderson had hauled down McArthur.
West Ham manager Sam Allardyce:
"We couldn't defend a fish supper tonight. There were howling errors from our defenders in all four goals, it was comical.
"I never expected us to defend so poorly. It was really poor defending and all the good work we might have done with the ball meant nothing in the end because out of possession we were just rubbish.
"It was an embarrassing defeat. They can't come knocking on my door about not playing now. They've got to take responsibility for their performance. They should have given me a lot more value for my money than they did."
Wigan manager Roberto Martinez:
"We're happy with how it went given there were changes. It was a real test of character, especially from the young lads.
"To score four goals away is a real achievement, especially at West Ham with the way they have started the season.
"He [Mauro Boselli] showed mental strength and how focused he is to be a success this season and to enjoy his football. If he is at his best he will be a real asset for us."
West Ham United
- 13 Henderson
- 03 McCartney
- 05 Tomkins
- 27 Spence
- 33 Potts
- 07 Jarvis
- 16 Noble (Taylor - 72' )
- 32 O'Neil (Tombides - 84' )
- 11 Maiga
- 12 Vaz Te (Fanimo - 62' )
- 46 Hall
- 30 Spiegel
- 19 Collins
- 41 Driver
- 14 Taylor
- 39 Tombides
- 40 Fanimo
- 45 McCallum
- 26 Al Habsi
- 05 Caldwell Booked
- 21 Ramis
- 23 Stam
- 24 Lopez
- 31 Figueroa
- 06 Jones
- 16 McArthur (Fyvie - 85' )
- 15 McManaman (Gomez - 74' )
- 19 Boselli (Orsula - 90' )
- 32 Miyaichi
- 12 Pollitt
- 17 Boyce
- 08 Watson
- 14 Gomez
- 20 Fyvie
- 02 Kone
- 35 Orsula