Bosnia-Herzegovina ended Iran's hopes of advancing to the knockout rounds with a 3-1 victory in Group F on Wednesday.
Queiroz announced his decision to quit shortly after the defeat, saying he was leaving because he failed to agree financial terms with Iranian football authorities.
''I showed my commitment and credibility, but I did not see any commitment to extend the contract,'' Queiroz said.
The 61-year-old Portuguese manager and former goalkeeper took over in 2011 and led the team through qualifying.
''I fell in love with Iran, but you can't have a marriage in which only one side wants to marry,'' he said.
Among other teams, Queiroz has coached Portugal, Real Madrid, MetroStars and was Alex Ferguson's assistant manager at Manchester United.
He defended his tactics by saying he lacked experienced players who could play more offensively. ''I have Iranian fans and players in my heart,'' Queiroz said. ''It was wonderful for me to work for Iran.
- Sports & Recreation
- Carlos Queiroz