Wa `alaykum As-Salamu waRahmatullahi wa Barakatuh.
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
In this fatwa:
1- Allah has permitted for us all that is good and wholesome and prohibited all that is impure and unwholesome.
2- It is a fact that Muslims are not allowed to consume pork or it’s by-products or animals that are not slaughtered or animals immolated to idols or deities other than God.
3- Scholar cannot declare soaps or detergents which may contain lard or oil or flesh of swine as forbidden for Muslims to use. If we were allowed to say that, then the same could be said of vinegar made from wine or alcohol.
In his response to your question, Sheikh Ahmad Kutty, a senior lecturer and an Islamic scholar at the Islamic Institute of Toronto, Ontario, Canada, states:
The Prophet (peace be upon him) also taught us not to be rigid and extend the prohibitions beyond the limits. Ibn Masud said: “You may do well to emulate the Prophet’s companions who never acted rigidly in matters of halal and haram.” Thus, when they ventured out of Arabia, they used to partake of the foods of the people of the book without digging into the details regarding their method of slaughter. They also used to eat cheese and other dairy products of Persians upon entering Persia, even though they were mostly Zoroastrians and not Jews or Christians.
They took to heart the words of the Prophet (peace be upon him):
“God has laid down certain obligatory duties, so never be slack in fulfilling them, and He has forbidden certain things so abstain from them. He has set certain limits, so never transgress them, and He is silent of many things, so do not dig into them; for He did so out of mercy for you and not because He is forgetful; then the Prophet cited the verse: Your Lord is never forgetful.” (Ad-Daraqutni)
Therefore, the scholars and jurists were never hasty in declaring things as haram. They used to abide by such rules: Permission is the rule while prohibition is an exception; hardship brings ease.
Now coming to consuming pork and its by-products there is no question we are to abstain from them; it is the same with alcohol or wine or intoxicants.
However, the question arises when wine or alcohol or by-products of pork such as its fat or oil used in certain products. The scholars would ask whether these ingredients retain the original properties or are wholly changed chemically into another product: if there is no change, the rule is clearly prohibition.
If, however, there is a chemical change in such a way that it does not retain the original properties, then the answer is: it is permissible. An example is that of wine or alcohol transformed into vinegar. The former is forbidden while vinegar is permissible.
Therefore, the jurists established the following rule: That a thing that is otherwise impure or forbidden can become pure or lawful once it is changed chemically through the law of istihalah. Imam Ibn al-Qayyim explains this as follows:
“That wine is rendered pure through the process of (chemical) transformation (istihalah) is known by analogy. For, though wine is impure, once the factor responsible for its impurity is taken away, the rule changes. It is a well-established principle of the Shar`iah based on fundamental sources. And it is the basis for reward and punishment.”
Accordingly, the same rule extends to things – previously deemed as impure- once chemically transformed, they become pure and lawful for our use.
Hence the texts declaring carrion, blood, the flesh of swine, wine or alcohol as haram cannot extend to plants, fruits, ashes, salt, mud, and vinegar: neither literally nor in meaning; neither by textual evidence nor through analogy.
So, when they say; wine became impure through chemical change (it was originally grapes or dates, etc.); likewise it becomes pure through chemical change when turned into vinegar. The same should apply to all things that were originally impure if they have undergone a chemical change.”
Based on these principles, Islamic medical association conference held in Kuwait on May 24, 1995, came up with the following conclusion:
Chemical transformation which results in turning a particular substance into different products with wholly different attributes and properties makes the impure as pure and lawful.
Therefore, soap containing lard or oil or pigments extracted from pork or other dead animals becomes pure because of the chemical transformation involved.
In conclusion, I would like to state: We cannot declare soaps or detergents which may contain lard or oil or flesh of swine as forbidden for Muslims to use. If we were allowed to say that, then the same could be said of vinegar made from wine or alcohol.
Having said this, I would like to point out: If someone wants to avoid soaps made of animal sources and stick to plant-based ones, that is their personal discretion; it is one thing to prefer something for personal reasons, and it is another to declare something that is lawful as unlawful.
The latter is a grave sin akin to ascribing partners with Allah – in the words of Imam Ibn al-Qayyim for we are not allowed to attribute the rule of halal and haram based on our opinions.
Allah Almighty knows best.