The draw was made in Douala on Saturday for the African play-offs for the World Cup in Qatar
Nigeria, who play in the last 16 at the Africa Cup of Nations on Sunday in Garoua, will take on Ghana.
The Black Stars will be seeking to recover from their elimination after the group stages in Cameroon. They lost their first game against Morocco, drew their second with Gabon and then lost 3-2 to Comoros.
Ghana coach Milovan Rajevac, who guided the team to the 2010 World Cup quarter-finals, insisted he would not resign after the humiliating loss.
Goal
"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.
Egypt face Senegal, Cameroon meet Algeria, the Democratic Republic of Congo play Morocco and Mali tackle Tunisia. The two-legged ties will be played between 21 and 29 March.
Egypt boss Carlos Queiroz has come under fire during the Cup of Nations.
Dspite boasting a forward line comprising Mohamed Salah, Egypt scored only two goals on their way to the last 16. The Pharoahs face Cote D'Ivoire in Yaoundé on Wednesday.
"The main goal when I signed was to qualify for the 2022 World Cup," said Queiroz.