Nigeria and South Africa are in Group B for the November 8-22 championship with the Ivory Coast and Zambia, while Group A comprises hosts Egypt, Mali, Cameroon and Ghana.
Teams are restricted to under-23 footballers and the finalists and the winners of the third-place play-off will represent Africa in Japan, where teams can use three ‘over-age’ players.
Nigeria have won gold (1996) and silver (2008) at Olympic football tournaments, Cameroon gold (2000) and Ghana bronze (1992).
South Africa and Nigeria stood out during a three-round qualifying competition for the tournament in Egypt, with all matches scheduled for Cairo.
The South Africans twice scored three goals against Angola and banged five past Zimbabwe in Soweto as they chase a second successive appearance at the Olympics.
Although lacking Samuel Chukwueze and Victor Osimhen, who were on senior national team duty, Nigeria crushed Sudan 5-0 last month after losing the first leg by a solitary goal.
The tournament doubles as the Africa U23 Cup of Nations and the previous two editions were won by Gabon (2011) in Morocco and Nigeria (2015) in Senegal.
Egypt (hosts), Mali, Cameroon, Ghana
Nigeria, Ivory Coast, South Africa, Zambia