"It was not an easy game," Mohamed Zidan, Egypt's Broussia Dortmund forward, said.
"Nigeria has a strong side with experienced and known players. We were a goal down and came back strongly to win the game. We never gave up and we deserved victory."
Zidan himself had an early chance to take the lead with a right-foot shot that was parried away by goalkeeper Vincent Enyeama.
Then Obasi, who plays for Germany's 1889 Hoffenheim, took the initiative, cutting in from the right, turning his defender and striking a shot across Essam al-Hadry, the Egyptian goalkeeper, and into the top left-hand corner.
But collectively Egypt worked hard to dominate, with Zidan putting another shot wide minutes before striker Emad Moteab intervened among Nigerian defensive indecision by collecting a through ball from Ahmed Hassan and rounding Enyeama before slotting the ball into the open net from the edge of the penalty area.
Nearly 10 minutes into the second half, the Pharos got some luck.
Pressing an uncertain Nigeria, a 20-yard shot from Hassan, their 35-year-old captain, took a deflection past Enyeama and gave Egypt the lead.
After a couple of missed Egyptian chances, they sealed victory in the 87th minute with Mohammed Naguy striking a shot from more than 20 yards into the bottom right-hand corner.
But Nigeria, who did qualify for this year's World Cup, felt they could have taken at least a point from the game, especially after missing chances to double their lead.
"We started well and got a goal but they came at us and equalised. They also scored early in the second half to unsettle us," Joseph Yobo, the Nigeria captain, said.
"Had we come out in the second half as we did in the first half, we would have won this very difficult game."
However, Hasan, who is in the Egyptian squad for the eighth successive tournament, will now feel more confident that his team can win the cup for a record third consecutive time.
In Tuesday’s other Group C match, Mozambique saved themselves from a poor start after giving away a penalty and an own-goal within 20 minutes to go 0-2 down to Benin.
Razak Omotoyossi scored the 13th minute penalty and Dario Khan found his own net when trying to clear to give Benin an excellent chance to win an African Cup of Nations match for the first time.
But Mozambique fought back with Miro taking advantage of poor defending at a corner to score with a looping header before the match had passed the half-hour mark.
They then pulled level, with Yoann Djidonou, the Benin goalkeeper, culpable after racing out of goal to clear. The resulting quick throw-in fell to Goncalves Fumo who put the ball into the net with Djidonou still out of his goal.