The Super Eagles took a first half lead through Emmanuel Emenike just before the break, but the Ivorians levelled on 50 minutes through Cheick Tiote.
However, Sunday Mba netted the winner 12 minutes from time for a sensational victory.
Elephants coach Sabri Lamouchi made eight changes from the team that drew 2-2 with Algeria in their last match, and it showed as Nigeria got out of the blocks faster, with Victor Moses firing in a shot on 10 minutes which Boubacar Barry parried to safety.
Emenike fired another shot over the bar on 27 minutes before their dominance was finally rewarded just before the break – the striker slotting a great free-kick after Moses was brought down just outside the area.
The Ivorians looked much better after the break and were duly rewarded just five minutes in when they drew level through Tiote, who headed in Didier Drogba’s free-kick at the back-post.
The Elephants kept up the pressure, though a warning sign of the Nigerian danger should have been forthcoming when Aide Ideye’s close-range headers was well saved by Barry.
Yaya Toure was put straight through and looked certain to score, but the excellent Vincent Enyeama was equal to the task.
It proved a crucial save as Nigeria scored the decisive goal just 12 minutes before the end – Mba beating three defenders before his deflected shot left Barry with no chance.
Ivory Coast through everything forward and had a number of chances, but just could not get the ball into the back of the net as the Eagles held on for a famous win.