Neymar's Brazil meanwhile will have to negotiate a group including Switzerland, Costa Rica and Serbia as they seek a sixth title.
In a star-studded ceremony in the Kremlin, England were placed with Kevin de Bruyne's Belgium, surprise packages Panama and Tunisia.
Host nation Russia will face Saudi Arabia in the tournament-opening match on June 14 in the Luzhniki Stadium in Moscow.
Russia's other opponents in Group A are Uruguay, led by Barcelona's Luis Suarez, and Egypt, spearheaded by Liverpool striker Mohamed Salah.
France and their potent strikeforce featuring Antoine Griezmann and teenage sensation Kylian Mbappe will play Australia, Peru and Denmark in Group C.
Spain's other opponents in a tough-looking Group B are Morocco and Iran.
Russian President Vladimir Putin said in a speech at the draw ceremony that Russia had a "strong affection" for football.
"Our country is looking forward to the championship and intends to hold it at the highest level," Putin said.
"I am sure that the forthcoming World Cup will be a huge factor in the development of the sport both in the Russian regions and throughout the whole world."
In the hours before the draw, FIFA President Gianni Infantino denied that doping was a problem even as Russia are at serious risk of being barred from the 2018 Winter Olympics for doping.
Infantino claimed that the level of testing in football is sufficient to show that the game is largely clean.
"I don't think there are many other international sports organisations who are doing as many anti-doping tests as football is doing," Infantino told a press conference.
"If you would have a serious doping issue in football this would be known by now, whether in Russia or any other country of the world."
Russia have been stripped of a third of the medals they won as hosts of the 2014 Winter Olympics in Sochi and last week a ban on the country taking part in international athletics was upheld.