If a person acquires haraam wealth, one of two scenarios must apply:
If he took it in a haraam transaction, such as selling something haraam, or as wages for haraam work, such as bearing false witness or singing. In this case, part of his repentance is to give in charity whatever he has in his hand of this wealth. If he is in need and he used the money to do business or to buy a car with which he can earn an income, then we hope that there is nothing wrong with that, but if he can give in charity the same amount as the haraam wealth, that is better and makes his repentance more complete.
Ibn al-Qayyim (may Allah have mercy on him) said: If he got involved in a haraam transaction and received the money, as in the case of a prostitute, singer, seller of alcohol, one who bears false witness and so on, then he or she repents and has that money in his or her hand, then some of the scholars said that it should be returned to its owner if it is his exact property and he did not take possession of it with the approval of sharee‘ah and its owner did not get any permissible benefits in return for it. Another group said: Rather his repentance means giving it in charity and he should not give it to the one from whom he took it. This is the view favoured by Shaykh al-Islam Ibn Taymiyah and it is the more correct of the two views.
End quote from Madaarij al-Saalikeen, 1/389
Ibn al-Qayyim spoke at length about this issue in Zaad al-Ma‘aad (5/778) and stated that the way to get rid of this wealth and to make his repentance complete is only by giving it in charity; if he is in need of it, he may take as much as he needs, then he should give the rest in charity. End quote.
For more information, see the answer to question no. 126045
If he took it by means of stealing or seizing by force, he has to return the wealth to its owner no matter how long a time has passed. But should he give the profit to him if he did business with it? There is a difference of opinion among the fuqaha’ concerning that.
The Hanbalis are of the view that he should return the profit too. The Maalikis and Shaafa‘is are of the view that the profit belongs to the one who stole it, because he is liable in the event of it being destroyed or lost. Abu Haneefah was of the view that he should give it in charity, because it came from a haraam source. Ibn Qudaamah said in al-Mughni (5/159): If he took something valuable and did business with it, or he took some trade goods and sold them and did business with the money, then our companions say: The profit belongs to the owner and the purchased item belongs to him. … al-Shareef said: And it was narrated from Ahmad that he should give it in charity.
Al-Sharbeeni al-Khateeb said: If the one who took wealth by force did business with the wealth, then the profit belongs to him according to the more correct opinion.
End quote from Mughni al-Muhtaaj, 3/363
See also: al-Mawsoo‘ah al-Fiqhiyyah al-Kuwaitiyyah, 22/84
Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) favoured the view that he should take from the profit a share like that of his peers, so he should be treated as if he took the money for a mudaarabah investment, so he may have half of the profit or one third or one quarter, according to what is customary.
Shaykh Dr. Khaalid al-Mushayqih (may Allah preserve him) was asked: A person stole a car belonging to someone else, and he used it for work and earned a certain amount of money from it. Now he has been arrested. To whom should this money be given? To the thief or to the owner of the car?
He replied: The money in such cases is a matter concerning which there is a difference of opinion among the scholars. The favoured view is that of Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him), which is that if he stole some money and did business with it, then he should have a share like that of his peers, i.e., he should look at this person who used this money, and pay him what experts and business people regard as the usual payment for such matters. So if they say that he should take half of the income, then he should be given half. If they say that he should take one quarter, then he should be given one quarter, and the rest belongs to the owner.
An example of that is the one who worked using this car; he should be given the share of his peers and he should be paid for his work. If someone like him would take one half or one quarter (then he should do likewise) and the rest should be given to the owner. This was narrated from ‘Umar (may Allah be pleased with him), in the story of his son, when he took some money from the bayt al-maal and consulted ‘Umar (may Allah be pleased with him) about that; he told him that he should regard it as a loan, i.e., mudaarabah. This was narrated by Maalik in al-Muwatta’ (1396).
And Allah knows best.
End quote from Fataawa Mawqi‘ al-Islam al-Yawm.
And Allah knows best.