Manuel Lanzini's ninth-minute strike was enough for the Hammers, who advanced into the fourth round with David Moyes also beating his former side for the very first time.
Starting on a stronger foot, the visitors broke the deadlock less than 10 minutes into kick-off. Lanzini slotted home a composed finish from a brilliant cut-back from Ryan Fredericks.
The Red Devils were left to play catch up for the rest of the game and, despite their best efforts, never found their way back into the match.
With returning talisman Cristiano Ronaldo not in the squad, Ole Gunnar Solksjaer's side couldn't find a game-changer tonight and went out in embarrassing fashion.
Another awful game for Manchester United, who have now lost twice in three games in all competitions. On the other hand, it was a night of jubilation for their London rivals, who picked up their first win at Old Trafford in 14 years.
Here are the player ratings for Manchester United:
Dean Henderson - 6.5/10
He was helpless with Lanzini's goal but didn't face any real challenges thereafter. Though he made a crucial stop in the 87th minute from Mark Nobl which kept Manchester United in the game.
Diogo Dalot - 7/10
The Portuguese full-back made a few promising runs down the flanks but his crosses were wayward. Also lost possession 14 times.
Eric Bailly - 7/10
Bailly was exposed in the dying embers and could consider himself lucky not to have conceded any late goals. It was still a good performance from the Ivorian, who timed his tackles (5) to perfection, made three clearances, won seven of his 10 aerial duels and completed 93% of his passes.
Victor Lindelof - 6.5/10
Like Bailly, the Swede too was caught out a few times and looked unconvincing in general tonight.
Alex Telles - 6/10
He was culpable for the goal as Telles was nutmegged in the build-up. But the Brazilian quickly recovered and then put in some good crosses and dispatched corners too.
Donny van de Beek - 8/10
The estranged Dutchman finally got a start and put in an impressive shift, especially in the first-half. He was tidy in possession and tested West Ham with some good late runs.
Nemanja Matic - 7/10
The Manchester United skipper was careless at times with his challenges but somehow escaped a booking. Also adventurous on occasions, darting forward to join up in attack or hooking a long ball in for the wingers.
Juan Mata - 7.5/10
Mata stemmed much of the good stuff coming from Manchester United in the attack as he knitted cool passes together and created a few good chances too.
Jesse Lingard - 6.5/10
Energetic and buzzing with confidence but the end-product was severely lacking. Also, no heroics for Lingard today against his old club.
Anthony Martial - 5/10
Besides some flashes of skill, Martial offered precious little in the attack. He played the whole match while he should've been taken off about the hour mark.
Jadon Sancho - 6/10
Sancho showed confidence and made a few key passes (3). But overall, not a vintage performance from the former Borussia Dortmund star, who's yet to reach his full potential with Manchester United.
Mason Greenwood - 6.5/10
The youngster could've made an immediate impact but it wasn't meant to be.
Anthony Elanga - 6/10
He ran and linked up play but nothing out of the ordinary.
ALSO READArticle Continues below
Bruno Fernandes - 6/10
Fernandes neither had the flair nor the panache to make any impact. He also wasted a few minutes towards the end.