Reincarnation and Mitzvot
There are two aspects connecting mitzvot and gilgul. Most Kabbalists believe a person's life of mitzvot and transgressions are the determining factors as to whether they will be reincarnated or not. There were also particular mitzvot that Kabbalists analyzed according to the doctrine of gilgul. The most common one was that of Levirate marriage, but there were others as well. According to the Jewish tradition, a person must be buried within twenty-four hours of death. This is usually seen as a sign of respecting the dead. In terms of gilgul, however, this becomes understood as an act facilitating the soul's transmigration.
The traditional Talmudic view was that people had 248 limbs and 365 sinews that correspond to the 248 positive and 365 negative mitzvot. Luria believed the soul had spiritual equivalents of these limbs and sinews. Only the mitzvah connected to a part of the soul animated and fulfilled that part. To be fully realized, a soul must fulfill all the mitzvot.
Can Souls Transmigrate Only into Humans?
Another controversy regarding transmigration was the question of whether or not a soul could only transmigrate into other humans. For some Kabbalists it was considered an insult to the human soul to consider its transmigration into nonhumans. Though everything has a soul, these Kabbalists saw the human soul as of a higher order. There were also those Kabbalists who believed that a soul, according to the severity of its trangression, could return in an animal or in another aspect of nature. For those who held this position, the very particular laws advocating kindness toward animals reinforce their opinion.
The Souls of Animals
There is a whole category of laws concerning the ritual slaughter of animals (shekhitah) that determines whether an animal is kosher and thus fit to be eaten. The conventional way of understanding these laws is to see them as aimed at preventing cruelty to animals. If you are going to eat meat, the laws of slaughter and kashrut (kosher) are meant to “humanize” the experience as much as possible. The slaughter is supposed to be swift and done with a particularly sharp knife in the vein that will kill the animal instantly. If the knife is not of the level of sharpness demanded, the slaughtering would not be kosher. Afterward, the animal must be covered with salt and soaked in water to drain the blood, for according to Leviticus, “the Nefesh [soul] of the flesh is in the blood” (17:11).
When considered in light of the idea of reincarnation even in animals, these very particular regulations can also be understood as out of kindness for the human soul that might possibly be in the animal's body. A related thought is that if we eat anything with the appropriate consciousness of the Divine we can raise up the spirit of what we have consumed and use the energy it gives us to do mitzvot.
All of the rules of ritual slaughter were also applied to sacrifices done during the time of the ancient Temples in Jerusalem.

