Is it permissible to take back a loan from a man most of whose wealth is haraam?
Haraam wealth is of two types:
1.That which is haraam because of the way in which it is acquired, such as that which is taken by means of riba and haraam transactions.
2.That which is haraam in and of itself, such as stolen and usurped wealth.
It is permissible for you to take your right from the former, because its being haraam applies to the one who acquired it only; in your case, you are taking it by legitimate means.
In the case of the latter, it is not permissible to take anything of it, because it is property that does not belong to the one who stole it or usurped it; rather it belongs to its rightful owner and must be returned to him.
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said: That which is haraam because of the way in which it was acquired is haraam for the one who acquired it, such as riba. If the person who dealt with riba dies, his wealth becomes permissible to his heirs. But as for that which is haraam in and of itself, such as alcohol [i.e., if a person died and left behind alcohol], then it is haraam for the one who carries it and the one to whom it is carried. Similarly what is haraam remains haraam, such as usurped and stolen wealth. If a person steals money then dies, it does not become permissible for the heir, and if its real owner is known he should give it to him; otherwise he should give it in charity on his behalf.
End quote from Liqaa’aat al-Baab al-Maftooh, 10/27
See also the answer to question no. 13503
And Allah knows best.