He wills. This, in essence, is what Ibn al-Qayyim expounded in al-Jawāb al-Kāfī.
Therefore, whoever takes a protected life—be it his own slave; a non-Muslim bound to us by treaty (muʿāhad) or granted safe-conduct (mustaʾmin); a newborn child; or even a fetus, such as when someone strikes a pregnant woman and she miscarries a lifeless babe—whoever kills any one of these must offer the prescribed expiation. The obligation is established by the general wording of Allah’s statement:
“Whoever kills a believer by mistake must set free a believing slave and pay blood money to the victim’s family, unless they remit it as charity. If the slain person belonged to a people who are hostile to you yet himself was a believer, then freeing a believing slave is required. If he belonged to a people with whom you have a treaty, then blood money must be delivered to his family and a believing slave set free. Whoever cannot find one must fast two consecutive months as repentance before Allah. Allah is All-Knowing, All-Wise.” (Q 4:92)
It makes no difference whether he alone committed the killing or others shared in it, nor whether the death resulted from direct action or indirect causation—such as digging a forbidden pit, planting a knife in someone’s path, or any other act that ultimately causes a person’s death.
Al-Muwaffaq said: “Each participant is liable for an individual expiation. This is the view held by the majority of scholars, including Mālik, al-Shāfiʿī, and the Hanafīs.” End quote.
The expiation is due from the killer whether he is an adult or a minor, sane or insane, free or enslaved, because the verse is unrestricted in its wording. The expiation consists of freeing a believing slave; if he cannot find one, he must fast two consecutive months.