Nigerian-born striker Ameobi stabbed home his seventh goal in the Tyne-Wear fixture a minute into injury-time to let Demba Ba off the hook after he had seen an 83rd-minute penalty brilliantly saved by Simon Mignolet.
The Black Cats, who were reduced to 10 men when Stephane Sessegnon was dismissed after 58 minutes and had skipper Lee Cattermole sent off after the final whistle, had taken a 24th-minute lead.
Referee Mike Dean pointed to the spot for Mike Williamson's tug on Michael Turner's shirt and Nicklas Bendtner calmly slotted the penalty past Tim Krul.
The visitors were the better side before the break, but Newcastle, who had earlier seen a Ba header come back off the crossbar, responded after it in front of a passionate crowd of 52,388 to lay siege to Mignolet's goal.
And Sunderland manager Martin O'Neill, who was involved in angry exchanges with counterpart Alan Pardew on several occasions during a pulsating encounter, could only look on as his first derby ended with contrasting emotions.
Sunderland have not fared well on Tyneside in recent seasons - they had not tasted victory at the home of their old foe since November 2000 - and went into the game with only one win in the last 14.
However, from the moment Cattermole senselessly careered into Cheick Tiote with just 40 seconds gone, it was they who largely set the tempo in a first half which, if not one for the purists, was nevertheless absorbing.
Amid a cacophony of noise from a packed house, the visitors enjoyed the better of the opening 45 minutes with Cattermole and Craig Gardner eclipsing Tiote and Yohan Cabaye in the middle of the field to allow Sebastian Larsson and Sessegnon to feed lone striker Bendtner.
However, it was referee Dean who proved the central character as he slipped further in the estimation of the locals.
Dean failed to send off Chelsea's David Luiz for a clear red card offence in December and, having already handed out five cautions inside the opening 23 minutes, he awarded the Black Cats a penalty as Williamson pulled Turner's shirt in the area as the pair jockeyed for position under Kieran Richardson's free-kick.
It took several seconds for the travelling fans high up in the stands behind Mignolet's goal to understand what had happened, but their joy increased markedly when Bendtner slid the spot-kick beyond Krul's dive to open the scoring.
Aggrieved as they were, the Magpies simply could not respond and Krul had to make a fine save to keep out Bendtner's powerfully-struck shot on the turn 13 minutes before the break, and was grateful to see Craig Gardner's deflected effort drop just over his crossbar three minutes later.
However, Newcastle finally found their feet and might have been level six minutes before the break had Mignolet not managed to beat away skipper Fabricio Coloccini's firm header from a Ryan Taylor corner.
They went even close in the final minute of the half when Ba met another Taylor corner at the near post and thumped a header against the bar.
The home side were themselves appealing for a penalty in injury time when Ba went down under John O'Shea's challenge, but nothing was given.
Pardew made a change at the break when he replaced left-back Davide Santon with Hatem Ben Arfa and asked Taylor to slot back into the defence.
Newcastle immediately had a new momentum and they went close twice within seconds as Ba glanced a header across goal and then fired just wide after turning Turner 20 yards out.
However, it took a fine double save by Krul to deny first Larsson and then James McClean as the home side were caught on the counter with 57 minutes gone.
But Sunderland's task increased in difficulty seconds later when Sessegnon was dismissed for lashing out at Tiote, although with Turner and O'Shea defending doggedly, they were managing to hold firm, if at times at full stretch.
It took a fine save by Mignolet to deny Ben Arfa after he had cut inside from the left with 13 minutes remaining, and the Frenchman was convinced he should have been awarded a penalty two minutes later after he went to ground under McClean's challenge.
The referee did, however, point to the spot once again with eight minutes remaining after Fraizer Campbell had tripped fellow substitute Ameobi.
Ba stepped up in anticipation of his 17th goal of the season, but saw Mignolet dive to his left to make a superb save.
However, there was nothing the Belgian could do to deny Ameobi when he stabbed home at the far post after Williamson had flicked on Cabaye's cross to spare Ba's blushes.