Nigeria has agreed a deal for US investment bank Merrill Lynch to take on most of its $500m (£257m) debt.
By eliminating debt, Nigeria hopes it will be more attractive to investors
The money is owed to the London Club, a group of creditor nations.
Nigeria's Finance Minister, Nenadi Usman, said it allowed a "clean start" and would prevent Nigeria from indiscriminate borrowing in future.
The government hopes the deal will make Nigeria more attractive for foreign investors and clear debt before it leaves office in May.
"The only debts that will remain would be those owed to multilateral institutions and a few bilateral loans," said the government.
The deal comes after the Paris Club - another group of creditors - gave Nigeria a debt relief package worth $18bn.
As part of the deal, Nigeria used money from oil revenues to pay back $12.4bn.
Only last year did Nigeria gain a credit rating from both Standard & Poor's and Fitch ratings agencies.