The US 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 November 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.
Group G was one of the toughest, pitting five-time World Cup winners Brazil against Serbia, Switzerland and Cameroon.
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-Thani welcomed the guests who included national team coaches, World Cup-winning players and football officials all waiting to discover the group stage matchups during a ceremony presented by British actor Idris Elba and broadcaster Reshmin Chowdhury.
The tournament will run from November 21 to December 18, the first time soccer’s top prize has been competed for in the Middle East and there was a distinct Arabian feeling to the show.
The Full Draw:
Group A: Qatar (hosts), Ecuador, Senegal, Netherlands
Group B: England, Iran, United States, Wales/Scotland/Ukraine
Group C: Argentina, Saudi Arabia, Mexico, Poland
Group D: France, Peru/Australia/UAE, Denmark, Tunisia
Group E: Spain, Costa Rica/New Zealand, Germany, Japan
Group F: Belgium, Canada, Morocco, Croatia
Group G: Brazil, Serbia, Switzerland, Cameroon
Group H: Portugal, Ghana, Uruguay, South Korea