The Court of Arbitration for Sport has overturned Morocco's bans from the 2017 and 2019 Africa Cup of Nations.
The Confederation of African Football originally imposed the sanctions in February after Morocco refused to host this year's tournament.
The Royal Moroccan Football Federation, which withdrew from hosting duties due to fears over the Ebola outbreak, was fined $1m (£655,944).
Following an appeal, CAS has ruled that Morocco should be permitted to compete in the next two AFCON tournaments, and the fine has been reduced to $50,000 (£33,714).