Ghana will have home advantage first and both legs will be played between March 21 and 29 with the aggregate winners securing a place at the 2022 World Cup in Qatar.
Egypt face Senegal, Cameroon meet Algeria, the Democratic Republic of Congo play Morocco and Mali tackle Tunisia in the other ties.
Only Mali among the 10 contenders have never qualified for the world football showpiece while Cameroon hold the record for appearances by an African team with seven between 1982 and 2014.
The pairing of Egypt and Senegal means either the reigning African Footballer of the Year, Sadio Mane, or his predecessor, Liverpool teammate Mohamed Salah, will miss out on the finals.
Nigeria brushed off a troubled build-up to the Cup of Nations, including the sacking of German coach Gernot Rohr, to be the only team among the 24 in Cameroon to win all three group matches.
While the Super Eagles look forward to a last-16 clash with Tunisia on Sunday, Ghana were shock first-round casualties, finishing bottom of a group after a stunning 3-2 loss to minnows the Comoros.
Serbia-born Ghana coach Milovan Rajevac, who guided the Black Stars to the 2010 World Cup quarter-finals, insisted he would not resign after the humiliating loss.
“My primary ambition from the time I took over as coach last October was to qualify Ghana for the World Cup in Qatar,” he said, amid rumors that he faces the sack.
Nigeria are seeking to qualify for the World Cup a seventh time and, from 1994, have missed only one of seven editions. The last of three appearances by Ghana was in 2014.
The World Cup qualifying rivalry between the West African nations stretches back to the 1962 edition and Nigeria and Ghana have beaten each other twice with four matches drawn.
Algeria, the Cup of Nations defending champions and shock early departees from the tournament, will face Cameroon, an in-form team with Captain Vincent Aboubakar scoring five times in three group games.
After going 35 matches unbeaten since last 2018, Algeria lost to Equatorial Guinea and were then outplayed by the Ivory Coast to make an embarrassingly early exit.
Egypt boss Carlos Queiroz is another coach who insists his priority is the World Cup, saying “the main goal when I signed was to qualify for the 2022 World Cup”.
Mali will fancy their chances of a historic first appearance at the finals after defeating Tunisia in Cameroon last week through an Ibrahima Kone penalty.
Senegal, Algeria, Nigeria, Morocco and Tunisia were the seeded teams based on the FIFA world rankings of last November.
AFRICA WORLD CUP 2022 Draws
Egypt v Senegal
Cameroon v Algeria
Ghana v Nigeria
Democratic Republic of Congo v Morocco
Mali v Tunisia