Praise be to Allah.
If a person earns money in haraam ways such as riba, bribes, stealing and cheating, etc., and his wealth is a combination of halaal and haraam, then it is valid to do business with him, buying and selling and entering into partnerships, but it is makrooh. If it is known that the product in which the trade is to be done is haraam in and of itself, then it is not permissible to enter into a partnership with him or work with him in that business.
Ibn Qudaamah said in al-Mughni (4/180):
If he buys from someone whose wealth includes both haraam and halaal, such as an unjust ruler or someone who deals in riba, if it is known that the item sold is from the halaal portion of his wealth, then it is halaal, but if it is known that (the item) is from the haraam portion, then it is haraam. If it is not known which it is, then we regard it as makrooh, because of the possibility that it may be haraam, but the sale is not invalid, because of the possibility that it may be halaal, whether the haraam element is small or great. In this case it is a doubtful matter. The lesser or greater the haraam element, the greater or lesser the doubt. End quote.
It says in Haashiyat Qalyoobi wa ‘Umayrah (2/418):
Partnerships are valid even if they are makrooh, such as a partnership with a dhimmi (a non-Muslim living under Muslim ruler), one who consumes riba and one whose wealth is mostly haraam. End quote.
In Haashiyat al-Dasooqi (3/277) it says:
Know that if a person’s wealth is mostly halaal and a small part of it is haraam, the correct view is that it is permissible to deal with him, lend money to him and eat from his wealth as Ibn al-Qaasim said, contrary to the view of Usbugh who says that that is haraam.
But if a person’s wealth is mostly haraam and a small part of it is halaal, the view of Ibn al-Qaasim is that it is makrooh to deal with him, lend money to him and eat from his wealth. This is the correct view, contrary to the view of Usbugh who says that that is haraam.
But if a person’s wealth is all haraam, this means that it is not allowed to deal with him, lend money to him or have any dealings with him, financial or otherwise. End quote.
What you have to do before entering into a partnership with such a person is advise him and encourage him to repent and give up wrongdoing. Strive to find a good source of income, for Paradise is good and none will enter it but those who are good. Warn him against continuing to consume haraam wealth, for every body that is nourished from haraam sources, the Fire is more fitting for it.
And Allaah knows best.