The United States will face England and Iran in Group B at the World Cup finals while Spain will take on Germany in a clash of former winners in Group E.
Holders France will meet Denmark and Tunisia in Group D while the tournament will kick off on Nov. 21 with hosts Qatar playing Ecuador.
For the US, the draw pits them against their former colonial rulers England and the Iranians, a country they have had long-running political disputes with.
The US faced Iran at the 1998 World Cup in France, losing 2-1 to the Gulf nation.
In what is deemed to be a 'group of death', two former champions Spain and Germany are drawn together.
Group G was one of the toughest, pitting five-times World Cup winners Brazil against Serbia, Switzerland and Cameroon.
Meanwhile, Argentina are drawn against Poland, Mexico and Saudi Arabia lining up a clash between Leo Messi and Robert Lewandowski.
The draw came after a 45 minute musical and video show as Fifa president Gianni Infantino promised the event would "simply be the best tournament ever".
The decision in 2010 to hand the hosting rights to Qatar was heavily criticised and there has been intense scrutiny of the human rights situation in the country.
Qatar's Emir Sheikh Tamim bin Hamad al-Thaniwelcomed the guests who included national team coaches, World Cup-winning players and football officials all waiting to discover the group stage match-ups during a ceremony presented by British actor Idris Elba and broadcaster Reshmin Chowdhury.
The tournament will run from Nov. 21 to Dec. 18 -- the first time football's top prize has been competed for in the Middle East and there was a distinct Arabian feeling to the show.