Portugal s coach Fernando Santos attends the Qatar 2022 World Cup quarter-final football match between Morocco and Portugal at the Al-Thumama Stadium in Doha. AFP
The 68-year-old Santos reached an amicable agreement with the federation to leave two years before his contract ends, a statement said.
The federation named no replacement for Santos and said it was starting its search.
Santos led Portugal to the 2016 European Championship title - the country's first international trophy - and the inaugural UEFA Nations League title in 2019.
Portugal left Qatar after a 1-0 loss to Morocco in the World Cup quarterfinals on Saturday.
The Portuguese squad had an enviable depth of talent and won its opening two games in the group stage. In the round of 16, it made a splash by thrashing Switzerland 6-1.
But Portugal's early departure from Qatar was widely regarded as an underachievement.
Whoever takes over faces a tricky question of how to manage Cristiano Ronaldo's future role in the team.
The 37-year-old star, who has made five appearances at World Cups over 16 years and is Portugal's record scorer and greatest ever player, was dropped from the starting lineup for the Switzerland game when a new generation of Portuguese players emphatically made their mark.
Against Morocco, he again started on the bench.
Those tactical options caused friction between Santos and his star player, who left the field in tears after the Morocco defeat.
In a later Instagram post, Ronaldo said his dream of winning the World Cup had ``ended,'' but he didn't say he would retire from international duty.
Portugal's qualifying campaign for Euro 2024, at least, appears straightforward. In Group J its opponents are Bosnia, Iceland, Slovakia, Liechtenstein and Luxembourg.
Portugal's next international games are in March.
Check the 2022 World Cup matches and statistics.
(For more sports news and updates, follow Ahram Online Sports on Twitter at @AO_Sports and on Facebook at AhramOnlineSports.)