vowed Hajj, so making it up became binding upon him, just as if he had become ill. And because that which is vowed is treated like that which is prescribed initially; if the prescribed act were to be missed, one would be required to make it up, and likewise for the vowed act.
Section: If one vows the fast of a specific month, or Hajj in a specific year, and performs that act before its time, it does not suffice him. Abu Yusuf said: It does suffice him, just as if he had sworn that he would fulfill a right upon him at a certain time and he fulfilled it before that time. Our evidence is that what is vowed is treated like what is prescribed by law; if one were to fast before Ramadan, it would not suffice him, and likewise if one were to fast the vowed fast before its time. Furthermore, he did not perform the vowed act at its appointed time, so it does not suffice him, just as if he had not performed it at all.
1863 - Issue; he said: (And whoever vows to fast, and dies before he is able to perform it, his heirs from among his relatives may fast on his behalf, and likewise for all that pertains to a vow of obedience).
This means anyone who vowed Hajj, fasting, charity, manumission, i'tikaf (seclusion in a mosque), prayer, or other acts of obedience, and died before performing them, his guardian (wali) may perform them on his behalf. Regarding prayer, there is a narration from Ahmad that one should not pray on behalf of the deceased, because it has no substitute whatsoever. As for other acts, it is permissible for the guardian to stand in for him, though it is not mandatory upon him; rather, it is recommended for him to do so as an act of kindness and righteousness. Ibn Abbas gave a legal opinion to that effect regarding a woman who had vowed to walk to Quba, and she died without fulfilling it, saying that her daughter should walk on her behalf (1). Sa'id (2) narrated from Sufyan, from 'Abd al-Karim ibn Abi Umayyah, that he asked Ibn Abbas about a vow of i'tikaf that was upon his mother. He said: Fast on her behalf, and perform i'tikaf on her behalf. He also said (2): Abu al-Ahwas narrated to us, from Ibrahim ibn Muhajir, from 'Amir ibn Shu'ayb, that 'A'ishah performed i'tikaf on behalf of her brother 'Abd al-Rahman after he died. Malik said: No one should walk, pray, or fast on behalf of another, and the same applies to all other bodily acts, drawing an analogy to prayer. Al-Shafi'i said: One may make up Hajj on his behalf, but one does not make up prayer—according to one established position—nor does one make up fasting—according to one of two positions—and a poor person should be fed on his behalf for each (3) day; because Ibn 'Umar said that the Messenger of Allah (peace and blessings of Allah be upon him) said: "Whoever dies while having a fast of a month (to fulfill), then a poor person should be fed on his behalf in place of each day."
(1) Reported by Al-Bukhari, in: The Chapter on Whoever Dies and Owes a Vow, from the Book of Oaths and Vows. Sahih al-Bukhari 8/177. It mentions therein that her mother had vowed to perform a prayer at Quba, so he said: Pray on her behalf. Reported by Imam Malik, in: The Chapter on What Is Required of Vows Concerning Walking, from the Book of Vows and Oaths. Al-Muwatta 2/472. (2) In: The Chapter on Whether the Living Can Perform a Vow on Behalf of the Deceased? from the Book of Shares of Inheritance. Al-Sunan 1/125. (3) In [B]: "every".