Ghana will play Madagascar, Angola, and the Central African Republic in the 2023 Africa Cup of Nations qualifiers.
The four-time African champions will qualify for the tournament in Ivory Coast if they finish among the best two in their group, but they are expected to top it.
The draw was held in the studios of SuperSport in Johannesburg, South Africa on Tuesday evening.
48 teams, including Ghana, were drawn into 12 groups of four teams (Group A to L) with the top two teams from each group qualifying for the tournament to be played in Ivory Coast in June next year.
Hosts Ivory Coast, are taking part in the qualifiers despite having already secured a place in the tournament, and will face Zambia, Comoros, and Lesotho.
Champions Senegal are in group L which contains Benin, Mozambique and Rwanda while 2021 runners-up Egypt take on Guinea, Malawi and Ethiopia.
Morocco, South Africa, who did not qualify for the last tournament, Zimbabwe, and Liberia make up the group of death.
Kenya and Zimbabwe, who have been suspended by FIFA from all football activities globally, were included in the draw.
The qualifiers will start in June 2021.
Group A: Nigeria, Sierra Leone, Guinea-Bissau, Sao Tome/Mauritius
Group B: Burkina Faso, Cape Verde, Togo, Eswatini
Group C: Cameroon, Kenya, Namibia, Burundi
Group D: Egypt, Guinea, Malawi, Ethiopia
Group E: Ghana, Madagascar, Angola, Central African Republic
Group F: Algeria, Uganda, Niger, Tanzania
Group G: Mali, Congo, The Gambia, South Sudan
Group H: Ivory Coast, Zambia, Comoros, Lesotho
Group I: DR Congo, Gabon, Mauritania, Sudan
Group J: Tunisia, Equatorial Guinea, Libya, Botswana
Group K: Morocco, South Africa, Zimbabwe, Liberia
Group L: Senegal, Benin, Mozambique, Rwanda