Ameobi, the younger brother of Magpies stalwart Shola, spared his side's blushes with a 113th-minute winner in a contest the Premier League side had been second best in for long periods.
Scunthorpe, without a win in League One, looked like pulling off a shock when they led deep into normal time thanks to Chris Dagnall's 14th-minute opener.
But after Newcastle had spurned chance after chance in the second half, most notably Leon Best, Ryan Taylor fired in his second free-kick in as many games on 80 minutes to force extra time.
Substitute Ameobi then proved the match winner with a stunning 20-yard goal to the delight of the Magpies fans behind the goal.
Newcastle manager Alan Pardew had targeted cup success during the week and while he made six changes from the 1-0 derby win over Sunderland at the weekend, only one of those was in a defence that had not been breached before tonight.
Mike Williamson came in for Steven Taylor while elsewhere outspoken midfielder Joey Barton's absence was the most notable as he instead considered a contract offer from QPR.
After completing a medical in London today Barton, placed on the transfer list after publicly criticising the club on Twitter, used the social networking website to say he needed "some thinking time and space" before deciding his future.
Without Barton, Newcastle failed to get to grips with their unfancied hosts in a first half when they could have been more than a goal behind.
Dagnall had already given a warning of his threat before his opener when he arrowed a drive just past the left-hand post.
He proved more deadly from close range after 14 minutes.
After the Newcastle defence failed to clear the initial danger the diminutive striker was perfectly placed in the six-yard box to receive a knock down and turn in from close range.
While it was the first time Newcastle's defence has been beaten, it was striker Demba Ba who looked most at fault after he played Dagnall onside.
Newcastle's first shot did not arrive until the 22nd minute, when Ryan Taylor fizzed a free-kick wide, and it preceded a good spell for the visitors.
Peter Lovenkrands and Yohan Cabaye tried their luck from distance, but the pressure subsided too easily and the visitors were lucky not to go 2-0 down on 40 minutes.
Goalkeeper Tim Krul made a fine reflex save above his head to deny Jimmy Ryan after he had been found unmarked by Dagnall's cut back.
The Magpies were dealt another blow just before the break when Williamson limped off with a leg injury and was replaced by Steven Taylor.
It was arguably the worst half the Magpies have played under Pardew and, while the manager might have had a few choice words at the break, it was their finishing rather than their application that he was left lamenting after the resumption.
Newcastle completely dominated the second half but spurned chance after chance, with Best and Peter Lovenkrands the main culprits.
Lovenkrands had a glorious chance when he ran onto an ungamely header back that sent him through, but his shot was blocked by Josh Lillis who was off his line in a flash.
Best then had a goal ruled out for offside and Lovenkrands shot over after racing into the area.
With the tempo rising Scunthorpe reminded of their threat and Dagnall forced Krul into a hurried stop.
Newcastle remained the more likely scorers, but when Best then lashed recklessly over when well placed the travelling fans behind the goal may have sensed it was not their night.
Krul was his side's best player and his save to deny Dagnall on 70 minutes underlined his growing stature on Tyneside.
Dagnall's header looked destined for the net when it deflected off Fabricio Coloccini at close quarters but the Dutchman somehow clawed it away.
The save was made all the more vital when Ryan Taylor equalised 10 minutes from the end with his second memorable free-kick in as many games.
The full-back crashed in the winner against derby rivals Sunderland at the weekend and it was another unerring set-piece from 20 yards that levelled matters.
Newcastle went for a winner in normal time and while they were denied a penalty when Steven Taylor went crashing down in the area they had to be content with extra time.
Newcastle initially failed to take the momentum into extra time as Scunthorpe re-established their threat.
Steven Taylor had to get back on his line to head away a 35-yard Mark Duffy shot, while Krul made another spectacular save to keep out Ryan's long-range effort.
The match looked destined for penalties when Best somehow failed to get the final touch before Ameobi opened his Newcastle scoring account in fine style.