A Muslim is commanded to earn his living through lawful means so that his life will be pure and free from sin. In his hadith, the Prophet (peace and blessings be upon him) addressed Sa`d ibn Abi Waqqas and said: “O Sa`d! Earn your living lawfully so that your supplication may be accepted.” In another hadith, the Prophet (peace and blessings be upon him) is reported as having said: “Allah, the Almighty is good and accepts only that which is good. Allah has commanded the faithful to do that which He commanded the messengers, and the Almighty has said: “O you messengers! Eat of the good things and do right.” And Allah, the Almighty has said: “O you who believe! Eat of the good things wherewith We have provided you.” Then he mentioned [the case of] a man who, having journeyed far, was disheveled and dusty and he spread out his hands to the sky [saying] : “O Lord! O Lord!” – while his food is unlawful, his drink unlawful, his clothing unlawful, and he is nourished unlawfully, so how can he be answered?”
The prominent Muslim scholar Sheikh ` Abdul-Bari Az -Zamzami, member of the Moroccan Scholars’ Association, states: Raising pigs means breeding and feeding them. This is surely a means of preparing them as food for people. Of course, this is forbidden. Regarding wine, the Prophet (peace and blessings be upon him) did not only curse those who drink it; the curse included those who prepare it, trade in it, and carry it. With regard to riba (usury), the Prophet (peace and blessings be upon him) stated clearly that Allah curses all those who are involved in the transaction whether they offer riba, receive it or witness the transaction.
By analogy, those who assist in raising pigs and preparing them as food for people are sharing in the sin. This is surely an act of helping people in disobedience, which is something forbidden in the verse that reads: ” Help not one another unto sin and transgression, but keep your duty to Allah. Lo! Allah is severe in punishment.” (Al-Ma’idah: 2)