All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah and that Muhammad is His slave and Messenger.
Many religious texts have been reported proving qisaas (retaliation against the transgressor) on the Day of Judgment as far as acts of injustice and transgression among people are concerned, and also that the wronged person shall be compensated from the good deeds of his transgressor (in proportion to the transgression), if he had any; otherwise, the transgressor shall bear the sins of the wronged person in the Hereafter (in proportion to the transgression). It has been narrated on the authority of Abu Hurayrah that the Prophet said, "He who has done a wrong affecting his brother's honor or any given act of injustice, let him ask his forgiveness today before the time (i.e., the Day of Resurrection) when he will have neither a dinaar nor a dirham. If he has done good deeds, a portion equal to his wrong doings will be subtracted from them; but if he has no good deeds, then he will be burdened with the evil deeds of the one whom he had wronged, in the same proportion." [Al-Bukhari]
This applies to the deceased's debts as well if he dies while unwilling to repay them despite his ability to do so because this constitutes injustice on his part. The Prophet said, "Delay in payment on the part of one who has the means (to pay) makes it lawful to dishonor and punish him." [Al-Bukhari, Ahmad, Abu Daawood, and others, with different wordings]
If no one repays the debts to which the deceased is liable, then he shall be held accountable for them on the Day of Judgment and shall be subject to the due retaliation, i.e. a portion of his good deeds will be deducted in proportion to his transgression. The Prophet said:
"The truly bankrupt of my followers is the one who comes on the Day of Resurrection with prayers and fasts and zakah but (he finds himself bankrupt on that day as he exhausted his funds of virtues) since he hurled abuses against some people, slandered some, unlawfully consumed the wealth of some, shed the blood of some, and beat some; and his virtues are then credited to their account (those who suffered at his hand). And if his good deeds fall short to clear the account, then some of their sins are entered in (his account) and he is thrown in the Hellfire." [Muslim]
It is understood from this hadeeth that when the good deeds of the transgressor are consumed and he has no more good deeds by which he can repay and compensate the wronged person, he shall be thrown into Hellfire. However, if the transgressor has good deeds left after repaying those whom he has wronged in the worldly life, then he shall be admitted to Paradise, if Allaah wills, and will not be thrown into Hellfire.
Al-Qurtubi said, "It is deduced from the ahaadeeth and reports in this regard that those whose scale (of good deeds) will be heavy (outweighing the scale of evil deeds), will be saved and admitted to Paradise to abide therein, eternally knowing with certainty that they will never enter Hellfire."
In case the person is thrown into Hellfire because of failing to repay the rights of the people whom he has wronged, then he will not abide therein perpetually, as long as he died as a believer. Abu Tharr narrated that the Prophet said, "Jibreel (Archangel Gabriel) came to me and gave me glad tidings, that whoever dies without associating anything with Allaah, then he will enter Paradise, even if he commits adultery and theft." [Ibn Hibbaan and others - Al-Albaani graded it saheeh (sound)]
This is with regards to the debtor who dies while procrastinating the repayment of his debts. However, if the indebted person is unable to repay his debts or passes away while intending to repay them, then it has been reported in some ahaadeeth that Allaah, The Exalted, will repay such debts on his behalf. For instance, the Prophet said, "Whoever takes the money of the people with the intention of repaying it, Allaah will repay it on his behalf, and whoever takes it in order to waste it, then Allaah will waste him." [Al-Bukhari and Muslim]
Ash-Shawkaani said, "As for a debtor who has no wealth to repay the debts of which he is liable and who dies while intending to repay such debts, it is authentically stated in the ahaadeeth that Allaah, The Exalted, will repay such debts on his behalf. It is even established that the mere love of repaying one's debts on part of the debtor upon his death entitles him to the privilege of having his debts repaid by Allaah on his behalf, even if he has wealth and his heirs did not repay his debts thereof." He brought forth many pieces of evidence to this effect.
However, if a debtor forgets about the debts of which he is liable and dies before repaying them, then he remains legislatively liable of repaying such debts, and his liability is not waived by forgetfulness. However, such debts may fall under the category of the debts that Allaah, The Exalted, repays on behalf of the indebted person if he had taken such loans with the sincere intention of repaying them but forgot to do so (and passed away). Al-Haakim reported in his book Al-Mustadrak that the Prophet said, "If someone takes a loan with the intention of repaying it and then passed away (before the repayment), then Allaah will pardon him and compensate the creditor with what he wishes..."
This is with regards to a debtor who passed away while intending to repay his debt but forgot about it.
Allaah knows best.