Mohamed Salah provided the decisive moment in the 11th minute, lashing in a free-kick through a gap in Ghana’s defensive wall.
A mistake by Ghana’s goalkeeper Brimah Razak presented Marwan Mohsen with a chance to double the lead but he shot over.
Daniel Amartey missed Ghana’s best chance, heading wide from Christian Atsu’s free-kick to the back post.
Record seven-time African champions Egypt knew a point would be good enough to take them through to the knockout stage and after Roma forward Salah put them ahead, they were contented to sit back and protect their position.
But for all Ghana’s increased possession, Avram Grant’s side – not helped by the loss of captain Asamoah Gyan to injury in 40th minute – could not find the cutting edge up front to get back on level terms.
And when it appeared they might break through after Atsu’s excellent jinking run had earned him a good shooting chance, the ball bobbled up off the much-criticised Oyem pitch and bounced off his shin as he took aim.
Emmanuel Badu’s low drive from 25 yards brought a decent save from Egypt’s 44-year-old goalkeeper Essam El Hadary, the oldest player to ever participate in the Nations Cup, and was also equal to Jordan Ayew’s fizzing effort later on.
Given Ghana’s lack of goal threat, Grant will be concerned that Gyan’s injury will rule the striker out of the match against DR Congo.
Egypt will take confidence from inflicting a first defeat on Ghana in Gabon – it was also the first goal the Back Stars had conceded in the tournament.
In another match also played on Wednesday, Mali were knocked out of AFCON as they drew with Uganda in their final Group D game.
Alain Giresse’s side needed to win to have a chance of making the last eight, but would have been eliminated anyway because of Egypt’s victory over Ghana.
On a waterlogged pitch, they struggled to find a way past Uganda, who were already out following two defeats.
But after Farouk Miya smashed in Uganda’s first AFCON goal since 1978 in the 70th minute, Yves Bissouma swerved in a free-kick in the 73rd minute to level scores at 1-1.
Egypt’s 1-0 win over Ghana means they qualify as group winners, with Ghana – who were already assured of a quarter-final place – going through as runners-up.
Egypt will face Morocco and Ghana will take on DR Congo in last-eight matches on Sunday.