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.
It is not permissible to deal with a person whose money is ill-gotten money if his entire money at hand is unlawful and he does not have other lawful money. Ibn Taymiyyah said: “The wealth that is unlawfully earned and the wealth that one gets by unlawful contracts, if a Muslim knows this, he should avoid it. If I know that a person stole the money or betrayed another person in his trust, or usurped it by taking it by force from him without any right, it is not acceptable for me to take it, neither as a gift or in return for another thing, nor as payment for work, or price for something sold, nor repayment of a debt as this is the very wealth of that wronged person.” For more benefit, please refer to Fataawa 88162 and 130298.
Therefore, it is not permissible for you to borrow money from that person since you know that the entire money that he possesses is ill-gotten money. A person who takes something from a usurper, a thief, or a transgressor, is like them since he knows that they transgressed on the right of other people.
Nonetheless, if we presume that you borrowed from him ill-gotten money that he possesses and you spend the loan on building houses for rent, or trade and the like, then the profit or the increment that resulted from that money is an issue over which the scholars differed in opinion whether the profit is due to the capital money and subsequently belongs the owner [of the money], or rather it is due to the effort and not to the capital money, and so it belongs to the worker who worked with the money for the evidence that the return (on an asset) is based on liability (i.e. bearing the risks and responsibility). A group of scholars holds the first opinion while another group holds the second opinion, however, the most preponderant opinion is the second opinion.
Allaah Knows best.