Both sides made wholesale changes from United's 2-1 Premier League win over the Hammers at the weekend, and it was David Moyes's men who settled quickest.
They deservedly went ahead after just nine minutes through Lanzini's first goal of the season, the Argentina international taking full advantage of some haphazard defending from the hosts.
Despite bringing on Mason Greenwood and Bruno Fernandes in the second half, United never really looked like clawing its way back into the game as the Hammers held on with relative ease.
West Ham was rewarded for a bright start, Lanzini coolly stroking into Dean Henderson’s bottom-right corner from 10 yards after a fine run from Ryan Fredericks.
Juan Mata struck the crossbar from an acute angle soon after, while Anthony Martial saw an effort deflected wide as United looked to restore parity.
Alphonse Areola pawed away a long-range drive from Jesse Lingard as the Red Devils, who carved out 13 shots to West Ham’s four in the first half, ultimately failed to find a leveller before the break.
Ole Gunnar Solskjaer introduced Greenwood shortly after the hour mark and the teenager should have scored almost immediately, but his effort was kept out by the foot of Areola.
West Ham squandered two glorious chances in the closing stages, Andriy Yarmolenko inexplicably hitting the post with the goal at his mercy and Mark Noble firing straight at Henderson, but it mattered little in the end as the visitors ended United's Carabao Cup run before it had even got going.
The win also represented Moyes's first since he was sacked by United in 2014 after only 9 months in charge.
🚨 The @Carabao_Cup FOURTH ROUND DRAW!! Can @pnefc upset @LFC in a north west derby? Maybe @WestHam will eliminate the blue half of Manchester as well? Can't wait 😋 #CarabaoCup— beIN SPORTS (@beINSPORTS_AUS) September 22, 2021
Watch LIVE via @kayosports, @Foxtel, Fetch and beIN SPORTS CONNECT!! ▶️ https://t.co/dR3JmGCC9x pic.twitter.com/AP5PunmeeP