The Portuguese, who will be 70 on March 1, has been to the World Cup four times, three with Iran where he was in charge for nearly a decade in two different spells.
Queiroz takes over from Spaniard Felix Sanchez, whose contract was not renewed after Qatar lost all three of their group matches when they hosted the World Cup in November-December.
Queiroz left Iran after the team also failed to get past the group stage.
"Official: Carlos Queiroz is the new head coach for Al-Annabi," the Qatar Football Association said on Twitter, using the national team's nickname.
"We wish the Portuguese coach all the best with our national team."
Growing speculation had linked Queiroz to the Qatar post after he said on his Instagram account last week that he was starting "a new journey" and thanked Iran fans for their "loyal" support.
Queiroz managed Iran at the 2014, 2018 and 2022 World Cups. He was in charge of Portugal in 2010 and led South Africa to qualification for the 2002 finals, but stepped down before the tournament.
The Portuguese was also coach for United Arab Emirates, Colombia and Egypt as well as Real Madrid and assistant to Alex Ferguson at Manchester United.