Wide-man Ameobi chipped in with two stunning strikes – including the all-important winner – as the Magpies saw off the competition’s current holders after extra time.
Ashley Fletcher gave the Hammers the lead from the penalty spot early on, but Luke Charman restored parity just after the hour-mark.
Captain Declan Rice headed the visitors back in front, but Ameobi’s stunner made sure of an additional 30 minutes, during which he found the net with another rasping effort from range.
Frenchman Haidara had a part to play in Newcastle’s first two goals, while ‘keeper Sels proved a commanding presence throughout.
And, after seeing his side seal their place in the last eight in dramatic fashion, Beardsley admitted they could not have done it without the help of their three senior performers.
“It was a massive bonus for the gaffer to give us those three players today,” he told nufc.co.uk. “With all due respect to what we have – and we have some good players – we do not win without Sammy, Sadio and Matz Sels.
“I thought we were really poor in the first half. We changed a couple of things ‘round after the break, and we had a bit more of an attacking impetus. In the first half, we were almost camped out waiting for West Ham to score, really. But we showed character in the second half and the two periods of extra time, helped with the quality of Sammy, Sadio and Matz.
“That, for me, is the difference at this level. To be fair to Sammy, I don’t know when he last started, but it’ll be a while, and he possibly looked a bit rusty in the first ten to 15 minutes. Obviously, we allowed him a little more freedom in the second half, in the sense that he could affect the game as he did. I have to be honest, I wasn’t convinced the second one was going in, but the first one, I knew as soon as it fell to him he would score. He has got great ability.
“Matz couldn’t do anything with either of the goals. The first was a penalty, and the second was a clear header – it was bad marking from us. He was outstanding. He made some great saves, some great blocks, kicks the ball well, and he plays how we want him to play.”
Newcastle join Brighton & Hove Albion, Colchester United, Norwich City and Swansea City in the quarter-finals, with three last-16 ties still to be played.
With a Premier League 2 Division Two play-off spot still up for grabs, too, Beardsley is hopeful of ending the campaign in memorable fashion.
“We’re at a level where we do target cup competitions – the Academy target the FA Youth Cup, 100 per cent, and we target the Premier League Cup,” he said. “I believe Colchester beat Sunderland last night, so the draw might just open up. More people take it seriously than don’t.
“To be fair to the people from West Ham, they said at the end that it was a great game and that it could have gone either way, and I can’t argue with that.”