After an open-air event against the illuminated backdrop of the pyramids, hosts Egypt, winners of the competition a record seven times, will face double champions Democratic Republic of Congo. Uganda and Zimbabwe fill the last two places in Group A.
Egypt will kick off the event against Zimbabwe on June 21. The tournament ends on July 19.
Group F in the 24-team tournament brought together the second and third most successful sides in its history. Cameroon, who won their fifth continental crown last time and were originally set to host the competition, will face four-time winners Ghana. Benin and Guinea-Bissau complete the group.
Group D contains three former champions, with top seed Morocco matched against Ivory Coast and South Africa, as well as Namibia.
Senegal, the only one of the six top seeds never to have won the event, will face a former champion Algeria as well as the East African pair of Kenya and Tanzania in Group C.
Nigeria take on Guinea, Madagascar and Burundi in Group B. Tunisia face Mali, Mauritania and Angola in Group E.
The host put on a colourful show, though it strangely included an acrobatic troupe imported from Austria who performed dressed as African zebras.
Egypt, Democratic Republic of Congo, Uganda, Zimbabwe
Nigeria, Guinea, Madagascar, Burundi
Senegal, Algeria, Kenya, Tanzania
Morocco, Ivory Coast, South Africa, Namibia
Tunisia, Mali, Mauritania, Angola
Cameroon, Ghana, Benin, Guinea-Bissau