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:
There is nothing wrong with consuming food that contains lanolin, if it is extracted from sheep’s wool.
Answering your question, we would like to quote the following fatwa published on www.islamqa.info:
If the sheep was slaughtered in the prescribed manner, then the matter is clear, because it is an animal that is regarded as pure and its flesh may be eaten, and it has been slaughtered in the prescribed manner. So, there is no doubt that its hair (wool) and other parts are pure.
But if the wool was taken from it when it was alive, or it was not slaughtered in the correct, prescribed manner, then the more correct scholarly view is that the hair of all animals is regarded as pure, even if the animal was not slaughtered in the prescribed manner.
Imam Ibn Taymiyyah (may Allah have mercy on him) said:
All hair, feathers and wool are pure, whether they are from an animal that may be eaten or the skin of an animal that may not be eaten, and whether they were taken from an animal that was alive or dead. This is the most likely to be correct of the scholarly opinions. (Majmu’ al-Fatawa, 21:38)
Even though there is a view that wool and hair are impure in general terms, if they are not taken from an animal that was slaughtered in the prescribed manner, this (lanolin) is a substance that is extracted from the wool, so it is no longer of the same nature as the impure hair from which it was taken; rather it has turned into a different substance, and has become – through this process of istihalah (transformation) – pure and halal.
In conclusion, there is nothing wrong with consuming food that contains lanolin, if it is extracted from sheep’s wool.
Almighty Allah knows best.