The answer is: if he was able to fast but was negligent and then died, then fasting is due from him. As for one who was not negligent, no fasting is due from him. If he had an illness from which recovery was not expected, then his obligation was to feed the poor. If it was an illness from which recovery was expected, but it continued until he died, then no make-up fasting is due from him, because he did not live to the point at which he could make it up.
The same applies if an accident occurs and the person responsible for the accidental killing dies immediately in that very accident. One who accidentally kills another person is required either to free a slave or to fast for two consecutive months. If he dies leaving enough wealth to free a slave, a slave is freed from his estate, because it is a debt due from him. But if he has no wealth, or no slave is available, then no fasting is due from him, since he was unable to fulfil it. The man was unable to fulfil it because he died immediately; how, then, can we obligate him to fast days that he did not live to see?! Allah Most High says:
“Allah does not charge a soul except with that within its capacity.” [al-Baqarah 2:286]
This is even clearer: it is utterly impossible.
Thus, appointing someone to fast on another’s behalf is never valid during the person’s lifetime, whether the fast is obligatory or voluntary, and whether the person is incapable or capable.
Fourth: Hajj. Hajj is like other acts of worship: the basic principle is that appointing a proxy is not permissible, because it is an act of worship, and the basic principle regarding worship is that it is required from the worshipper himself; another person cannot take his place in it. However, proxy performance of Hajj is established for two categories of people.
The first is one who dies before performing the obligatory Hajj: Hajj is performed on his behalf, because this is established by the sunnah (1).