Islam orders Muslims to show due care and kindness to animals. This is part of the mercy of Islam to all living creatures. Allah Almighty addresses the Prophet saying, [We sent thee not save as a mercy for the beings] (Al-Anbiya’ 21:107).
If it is necessary to dissect an animal for scientific purposes, then there will be nothing wrong with the act but the animal must be dealt with kindly and anaesthetized fully to prevent pain.
In this regard, Sheikh Muhammad Saleh Al-Munajjid, the prominent Saudi Islamic lecturer and author, states the following: “If it is necessary to dissect an animal for a scientific purpose, there is no sin in that, in sha’ Allah. The scholars have ruled that it is permissible to dissect the body of a Muslim for the purposes of criminal investigations or preventative medicine. So it is more likely that it is permissible to dissect the bodies of animals for the purpose of scientific research, if there is a need for that.
Moreover, the student dissecting the animal must treat it properly; he or she should anaesthetize it fully [in case of a vivesection] and hasten to kill it as soon as the dissection is over, because the Prophet (peace and blessings be upon him) said, “Allah has prescribed proficiency in all things, so if you kill, kill well, and if you slaughter, slaughter well. Let one of you sharpen his blade and spare suffering to the animal” (Muslim).