If a person takes out an interest based loan and buys property with it, when he dies the property becomes part of the estate which is inherited from him, but he has sinned by dealing in riba.
Shaykh Ibn ‘Uthaymeen (may Allaah have mercy on him) said:
What is haraam because of the way in which it is acquired is haraam for the one who earns or acquires it, such as riba. But if the person who dealt with riba dies, then his wealth is permissible for his heirs. What is haraam in and of itself, such as alcohol, is haraam to the one who acquires and to the one to whom he passes it on. Similarly, if a person steals something or seizes it by force then dies, it is not permissible for his heir (to take the stolen property); if he knows who it belongs to he must return it, otherwise he should give it in charity on behalf of the owner.
From Liqaa’aat al-Baab al-Maftooh, 1/304
The Standing Committee issued a fatwa concerning a person who built a house with a riba-based loan, stating that he has to repent and seek forgiveness, and that he does not have to destroy the house; rather use may be made of it by him or someone else living in it.
Fataawa al-Lajnah al-Daa’imah, 13/411.
And Allaah knows best.