If you borrow money from a commercial lender and the lender later cancels or forgives the debt, you may have to include the cancelled amount in income for tax purposes, depending on the circumstances. When you borrowed the money you were not required to include the loan proceeds in income because you had an obligation to repay the lender.
When that obligation is subsequently forgiven, the amount you received as loan proceeds is normally reportable as income because you no longer have an obligation to repay the lender. The lender is usually required to report the amount of the canceled debt to you and the IRS on a Form 1099-C, Cancellation of Debt.
Here’s a very simplified example. You borrow $10,000 and default on the loan after paying back $2,000. If the lender is unable to collect the remaining debt from you, there is a cancellation of debt of $8,000, which generally is taxable income to you.