Declan Rice endured a nightmare return to West Ham as Arsenal were dumped out of the Carabao Cup in the fourth round following a 3-1 defeat.
Ben White headed an own goal past Aaron Ramsdale – playing his first club game since September – before Mohammed Kudus and Jarrod Bowen secured the win.
Martin Odegaard scored a consolation for Arsenal deep into stoppage time.
Rice, a £105 million signing for Arsenal from West Ham in the summer, came on as a second-half substitute.
But he could not stop his former club reaching the quarter-finals.
West Ham took the lead from a corner in the 16th minute with Bowen swinging the ball in close to Ramsdale, before White nodded it past him.
Tomas Soucek had hold of Ramsdale’s shirt, but with no VAR at this stage of the League Cup, the complaints of the England international fell on deaf ears.
Arsenal dominated possession but failed to break through in the first half. Eddie Nketiah skewed over their best chance from eight yards following Oleksandr Zinchenko’s knock-down.
And they were punished five minutes after the break when Kudus beautifully trapped Nayef Aguerd’s 50-yard cross-field pass before finishing low through the legs of Gabriel and into the far bottom corner.
West Ham’s win was safe shortly before the hour when Bowen collected a poor defensive header from White and fired in a volley from the edge of the area, a deflection off Gabriel’s thigh wrongfooting Ramsdale.
Arsenal captain Odegaard slotted into the bottom corner with the final kick of the game, but the Gunners’ 30-year wait to win the League Cup goes on, while West Ham are into the last eight for the third successive season.
No joy for Rice on West Ham return
The major talking point in the build-up to the tie was the return of Rice to West Ham for the first time since joining Arsenal.
Rice made almost 250 appearances for West Ham and captained them to a Europa Conference League triumph in June, and Moyes called for the ex-Hammers midfielder to be “welcomed back with open arms”.
That call was mostly heeded by the home fans, who gave Rice a strong ovation when he warmed up for the first time midway through the first half.
By that point his new club were already trailing and while Arsenal were on top for the majority of the game – West Ham did not have a shot in the first half, despite taking the lead – they produced little end product.
Rice was named on a stacked Arsenal bench also featuring Bukayo Saka, Gabriel Martinelli and Odegaard, with Mikel Arteta making six changes to his starting XI including a first appearance for Ramsdale since the third round.
All four were thrown on in the second half, Rice to a heady mix of boos and applause with whistles of derision when his first ball forward was overhit for a goal kick.
West Ham, meanwhile, were much improved from the side that lost their three previous matches, and had been labelled a “shambles” by their own forward, Michail Antonio.