West African giants Nigeria are in Group C alongside 2004 Afcon champions Tunisia and East African sides Uganda, and Tanzania.
Tournament hosts, Morocco are in Group A along with 2012 winners Zambia, Mali and Comoros.
While defending champions Ivory Coast will square off with five-time winners Cameroon, Gabon and Mozambique in Group F.
Meanwhile, record seven-time winners Egypt were pitted against 1996 champions South Africa in Group B, including Angola and Zimbabwe.