Assuming the loan was originally recorded as a liability, the journal entry to forgive the loan would be a debit to the allowance for doubtful accounts and a credit to the loan payable. This would reduce the amount of money that the company owes on its balance sheet.
For example, if a company owed $1,000 on a loan and it was determined that there was no likelihood of ever collecting this money, the company could write off the debt by recording a $1,000 debit to the allowance for doubtful accounts and a $1,000 credit to loans payable.