Champions League-chasing Newcastle capitalised on poor West Ham defending to hit five goals at London Stadium and pile the pressure on Hammers manager David Moyes.
Callum Wilson and Joelinton put the visitors two ahead inside 15 minutes, before Kurt Zouma pulled one back.
But blunders by Nayef Aguerd and Lukasz Fabianski allowed Wilson to double his tally and Alexander Isak to add a fourth, with Joelinton making it five in stoppage time.
Defeat leaves West Ham outside of the relegation zone on goal difference.
Moyes’ side are one of four teams on 27 points, alongside Everton, Nottingham Forest and 18th-place Bournemouth.
Newcastle remain third and are now three points clear of fifth-placed Tottenham with a game in hand, following a fourth successive win for Eddie Howe’s side.