The Hammers went in to the match having lost just one of their previous six games, but they were easily torn apart by Wigan in the third round clash at Upton Park.
The London club took the lead through Modibo Maiga, but a series of calamitous errors allowed the Latics to progress.
Slack marking from Jordan Spence allowed Mauro Boselli to equalise and the Hammers defence backed off Ivan Ramis to allow the Spaniard to put the away side 2-1 ahead.
Yet more loose marking allowed Boselli to chip home a wonderful third and Stephen Henderson's foul on James McArthur in the dying minutes allowed Jordi Gomez to seal the rout to leave Allardyce red-faced with embarrassment at the final whistle
"We couldn't defend a fish supper tonight," the West Ham boss said.
"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."
Allardyce made nine changes from the XI that drew 1-1 with Sunderland on Saturday, giving the likes of James Tomkins, Gary O'Neil and George McCartney a chance to prove to him that they should start Monday's league game against QPR, but they all failed miserably.
The Hammers looked shaky at the back and devoid of ideas going forward, with 18-year-old debutant Robert Hall the only home player worthy of any praise.
Allardyce added: "I made lots of changes to see what the squad looks like and what some of the young ones are doing. They are doing well in the Under-21s league but unfortunately from 15 minutes on tonight they weren't good enough and in the end we have got beat 4-1 and it was very disappointing for me to sit there and watch that.
"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."
Roberto Martinez was understandably much happier following the final whistle, which was greeted with a loud chorus of boos from the home fans.
The Spaniard's main source of pride came from the performance of Boselli.
Derided for scoring two goals in two years at the Lancashire club, the Argentinian did little to appease his critics when he missed a sitter in the club's 2-1 defeat to Fulham on Saturday.
The 27-year-old, who has been shipped out on loan to former club Estudiantes and Italian side Genoa during his time with Wigan, showed great predatory instinct to steal ahead of Spence for his first and the chip over Henderson from 12 yards was a sublime finish.
Martinez said: "He looked strong, he looked very sharp with his build-up play and then that clinical finishing in front of goal.
"I was very, very pleased with his work, it is now a matter of allowing him to settle into the Barclays Premier League.
"He had real good opportunity on Saturday and today, he wasn't afraid to get in good positions to score goals.
"He 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."
Wigan have won only one of their five league games, but controlled the game well from midfield tonight, with Ryo Miyaichi, David Jones and James McArthur all impressing in an experimental XI that contained seven changes.
"We're happy with how it went given there were changes," the Spaniard said.
"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."