What would happen if a person passed away when he had to pay back various companies money he had taken from them through false claims but had the intention of doing so before he had passed away? What will his consequence be in the eyes of Allah Subhanahu Wa Ta’ala?
In the name of Allah, Most Compassionate, Most Merciful.
There are two solutions regarding money incurred through unlawful means. One is to give the money or item back to the rightful owner. Where this is not possible then one should give it to charity without the intention of getting possible reward for that money. With regards to your situation, if it is difficult to find the owners then you should get an estimate of how much you had incurred through unlawful means and give that amount as sadaqah. Do not use it in the construction of masaajid or in anything connected to the running of masaajid. It should be given in the hand of an extremely destitute person. You do not need to inform him or her of the nature of the money. Insha’Allah, Allah will reward you for your good intentions.
As for the haram earnings of the deceased person, it is makrooh (disliked) for the heirs to take that amount it should be returned back to the rightful owners and if it isn’t possible, then it should be given to a destitute person. After doing this, one should ask Allah Ta’ala for forgiveness on the deceased persons. Insha’Allah Allah will forgive him.