Joselu marked his first start for Newcastle with a goal as Rafael Benitez was finally able to celebrate a first win of the season.
The Spanish striker converted Christian Atsu's 36th-minute cross to lift the mood at St James' Park, and defender Ciaran Clark and substitute Aleksandar Mitrovic sent the locals among a crowd of 52,093 home happy with second-half strikes.
It was exactly what the promoted Magpies needed after weeks of claim and counter-claim on Tyneside and ahead of a hugely important final few days of the transfer window.
TWEET OF THE MATCH
"Newcastle bang in 3 against West Ham and finally @alanshearer stops whining about his poorly celebratory arm." - Gary Lineker pokes fun at his BBC Match of the Day co-star and former Newcastle striker Alan Shearer.
Jonjo Shelvey's sending-off against Tottenham and subsequent suspension robbed Benitez of one of his most creative players, but Mikel Merino proved an able deputy. The Spaniard, on loan from Borussia Dortmund, turned in a commanding individual display and provided the pass from which Atsu set up Joselu's goal.
MOMENT OF THE MATCH
Joselu may not have been the name on the lips of Newcastle supporters as they anticipated a summer move for a striker, but he was the toast of the Toon on Saturday evening. It was he who got himself into exactly the right place to meet Atsu's unselfish pull-back and fire his side into a deserved lead.
Benitez freely admits he has not been a happy man in recent weeks, and his displeasure has sparked fears that there could be a parting of the ways. He may or may not get the support he craves in what remains of the transfer window - or at least a measure of it - but at least his team is now up and running in the Premier League and looking like it can compete.
Rob Elliot: 7/10
Javier Manquillo: 6
Jamaal Lascelles: 6
Ciaran Clark: 7
Chancel Mbemba: 6
Mikel Merino: 8
Isaac Hayden: 7
Matt Ritchie: 7
Ayoze Perez: 7
Christian Atsu: 7
Aleksandar Mitrovic (for Joselu, 72 mins): 7
Mohamed Diame (for Hayden, 82 mins): 6
Jacob Murphy (for Ritchie, 88 mins): 6
Joe Hart: 6
Pablo Zabaleta: 6
James Collins: 6
Angelo Ogbonna: 6
Aaron Cresswell: 7
Declan Rice: 5
Mark Noble (Capt): 6
Edimilson Fernandes: 6
Michail Antonio: 7
Andre Ayew: 6
Javier Hernandez: 5
Manuel Lanzini (for Rice, 46 mins): 6
Diafra Sakho (for Ayew, 70 mins): 6
Cheikhou Kouyate (for Noble, 71 mins): 6
WHO'S UP NEXT?
Swansea v Newcastle (Premier League, Sunday, September 10)
West Ham v Huddersfield (Premier League, Monday, September 11)