كتب : Mohamed Sabe
Despite the defeat, Senegal advanced to the quarter-finals in second place on goal difference after Ghana received a shock 2-1 against Zimbabwe in the other group D match.
World Cup finalists Ghana and Zimbabwe finished in third and fourth places respectively with three points each to exit the African Cup from the first round.
Martins struck the winner for Nigeria in the 88th minute after nine minutes from netting the equalizer.
Substitute Souleymane Camara had put Senegal ahead from close range in the 59th minute when he pounced on a rebound after Henry Camara's initial effort was parried by Nigeria keeper Vincent Enyeama.
Enyeama saved Nigeria blushes when he denied another close range drive from Henri Camara in the 78th minute.
Seconds later Martins connected with a Nwankwo Kanu cross to head home the equalizer for the Super Eagles.
Martins dealt the final blow to Senegal when he fired an unstoppable left-footer after been set-up by a Kanu header.
Elsewhere, Zimbabwe's African Cup campaign ended on a high note after they defeated Ghana 2-1 in Ismailia.
Cephas Chimedza fired Zimbabwe ahead on the hour and striker Benjani Mwaruwari stretched the lead for the Warriors.
Baba Adamu scored the consolation goal for Ghana in stoppage time.