Costa has been replaced on an interim basis by compatriot Jose Garrido, who had been working for the federation as a technical director
Africa Cup of Nations hosts Gabon have sacked coach Jorge Costa little more than two months before the start of the 2017 tournament, the country's federation announced on Friday.
The Fegafoot first cancelled a Costa press conference scheduled for Friday morning before announcing the departure of the 45-year-old former Portugal defender.
He has been replaced on an interim basis by compatriot Jose Garrido, who had been working for the federation as a technical director and previously worked as a coach in the Middle East. He will give a press conference on Saturday morning, Fegafoot said.
Garrido must then prepare for the crucial World Cup qualifier away to Mali in Bamako on November 12.
Costa, who had been in the job since 2014, oversaw a 0-0 draw at home to Morocco in a 2018 World Cup qualifier in his final match in charge last month.
His absence from the draw for the Cup of Nations in the capital Libreville on October 19 did not go down well in the country.
Gabon will play Guinea-Bissau in the opening match of the tournament in Libreville on January 14 before also facing Burkina Faso and Cameroon in Group A.
Ex-Porto stopper Costa had initially been let go at the end of June due to his "uneven" results but was then reappointed in August with the aim of getting to the final of the Cup of Nations.
He was the best-paid coach in Africa with a monthly salary of 70,000 euros ($78,000).