Queiroz leaves his role as Iran head coach
The former Real Madrid boss took charge of Iran in April 2011 and led the team to the 2014 World Cup in Brazil.
Under Queiroz's stewardship, Iran also made the quarter-finals of the Asian Cup in Australia earlier this year, where they were defeated on penalties by Iraq.
Following a 3-1 friendly defeat to Sweden on Tuesday, the Portuguese opted to end his tenure.
"After four years of work with the national team, I am proud of the team and the individual players," Queiroz said.
"Now I am sad to leave the team, but that's life and I'm happy to be moving forward."
Queiroz, a former Manchester United assistant manager, had penned a contract to remain as Iran coach until the 2018 World Cup in September.