The Uganda Cranes have been drawn in group A alongside hosts Egypt, neighbours Democratic Republic of Congo and Southern Africa side Zimbabwe.
The draws have Friday evening been held in Cairo Egypt.
This is Uganda’s second consecutive appearance at the continent’s top most continent.
Egypt will host the tournament from June 21 to July 19 featuring 24 nations and the opening game will be between hosts Egypt and Tanzania.
Before qualifying for the 2017 tournament held in Gabon Uganda had taken 39 years without playing at the highest continental level.
In Gabon, Cranes did not come out of the first round, when they lost 1-0 to Ghana in their first match, before conceding another 1-0 defeat to Egypt.
Uganda’s last game ended in a one all statement against Mali.