A vote of the executive committee, meeting in the Ethiopian capital, awarded Cameroon the 2019 finals and Ivory Coast will stage the 2021 edition.
In an unscheduled announcement Caf also decided to hand Guinea the right to host the 2023 finals.
Algeria and Zambia lost out in the bidding process.
The Democratic Republic of Congo had withdrawn from the race two months ago.
Cameroon, who will stage the tournament in 2019 previously staged the Nations Cup in 1972. Cameroon’s bid was centred around four venues in Bafoussam, Douala, Garoua and Yaounde.
Ivory Coast, awarded the 2021 edition, are also former hosts, having staged the Cup of Nations in 1984. The Ivorians plan to use five cities – Abidjan, Bouake, Korhogo, San Pedro and the capital Yamoussoukro.
The 2023 hosts were not expected to be named at the executive committee meeting.
A Caf spokesperson later told the BBC that, on the basis of Guinea’s presentation “and commitment”, the committee “decided to exercise its power to make an immediate decision.”
Guinea have never hosted the competition which was first staged 57 years ago in the Sudanese capital Khartoum. Guinea’s bid promised to use Conakry, Kankan, Labe and Nzerekore as venues. Ironically the country is currently banned from hosting any international football by Caf because of the Ebola virus outbreak.
The two nations who miss out are Zambia and Algeria.
Zambia’s bid-package for the tournament in five years’ time included matches played against a backdrop of the spectacular Victoria Falls.
They were awarded the 1988 tournament only to be replaced by Morocco because they lacked the required funds.
The Algerian bid had seemed among the strongest, but their cause would not have been helped by the death of Cameroonian striker Albert Ebosse after a match in the north African state.
Ebosse died last month having being struck by a piece of slate allegedly thrown by a supporter of the club he played for, former African champions JS Kabylie.
Each country made a 30-minute, eve-of-vote presentation and the executive committee also had a report on each candidate to help them decide.
A five-man inspection team led by senior executive committee member Amadou Diakite from Mali spent several days in each of the five countries this year.
Among the facilities under the Caf microscope were stadiums, training grounds, hotels, hospitals and media centres, plus road, rail and air links.
The Nations Cup has been spread around the continent recently with southern, central, western and northern countries among the previous five hosts.
Ethiopia were the last east African hosts in 1976 with cash-strapped Kenya withdrawing as 1996 hosts and South Africa taking over.
Kenya, Algeria, Ethiopia, Ghana, Mali and Zimbabwe are reportedly interested in replacing strife-torn Libya as the 2017 hosts ahead of a September 30 deadline for bids.
The 2017 Cup of Nations hosts will be named next year.