Fifty-three African countries were in the draw, with only Zimbabwe missing following their expulsion by Fifa for failing to pay a former coach.
Africa has been allocated five spots in the finals, which will be played in Russia from 14 June to 15 July.
There will be three rounds of qualifying for the African sides.
Round one features the lowest 26 ranked countries on the continent in Fifa‘s July rankings. The winners of those ties advance to round two where they will join the remaining 27 highest-ranked teams.
In the final round, five groups of four teams will meet both home and away and the winner of each group will qualify for Russia 2018.
Former Cameroon striker Samuel Eto’o was on stage in Russia to help with the African draw, and pulled out his own nation.
The Indomitable Lions will feature in round two, and will take on the winners of the the first tie from round one between Somalia and Niger.
In the pick of the other ties, 2010 World Cup hosts South Africa face a tough second round meeting against Angola; the African champions Ivory Coast will play either Liberia or Guinea Bissau, and the 2015 runners-up Ghana will face either Comoros or Lesotho.
Nigeria, under new coach Sunday Oliseh, will play either Djibouti or Swaziland, and Algeria – Africa’s highest ranked nation – will play the winners of Tanzania vs Malawi.
13 two-legged ties, played home and away, between 5-13 October 2015:
|First Round Matches|
|1. Somalia vs Niger||8. Eritrea vs Botswana|
|2. South Sudan vs Mauritania||9. Seychelles vs Burundi|
|3. Gambia vs Namibia||10. Liberia vs Guinea Bissau|
|4. Sao Tome e Principe vs Ethiopia||11. Central African Republic vs Madagascar|
|5. Chad vs Sierra Leone||12. Mauritius vs Kenya|
|6. Comoros vs Lesotho||13. Tanzania vs Malawi|
|7. Djibouti vs Swaziland|
The winners of the first round plus 27 highest-ranked teams in Africa. All 40 teams paired into 20 ties, played home and away, between 9-17 November 2015:
|Second Round Matches|
|Winner 1 vs Cameroon||Winner 11 vs Senegal|
|Winner 2 vs Tunisia||Winner 12 vs Cape Verde Islands|
|Winner 3 vs Guinea||Winner 13 vs Algeria|
|Winner 4 vs Congo Brazzaville||Sudan vs Zambia|
|Winner 5 vs Egypt||Libya vs Rwanda|
|Winner 6 vs Ghana||Morocco vs Equatorial Guinea|
|Winner 7 vs Nigeria||Mozambique vs Gabon|
|Winner 8 vs Mali||Benin vs Burkina Faso|
|Winner 9 vs Democratic Republic of Congo||Togo vs Uganda|
|Winner 10 vs Ivory Coast||Angola vs South Africa|
20 winners of the second round will form five groups of four teams who will meet both home and away. Matches to be played between 3 October 2016 and 14 November 2017. The five group winners qualify for the 2018 Fifa World Cup in Russia.
Source: BBC Sport