A woman came to the Messenger of Allah (peace and blessings be upon him) and said: "O Messenger of Allah! I had given a slave girl in charity to my mother, and she has died and left the slave girl behind?" He (peace and blessings be upon him) said: "Your reward is secured, and she has returned to you as inheritance." She said: "She has died while she owed fasts; will it suffice if I fast on her behalf?" He (peace and blessings be upon him) said: "Yes!" She said: "She also did not perform Hajj; will it suffice if I perform Hajj on her behalf?" He (peace and blessings be upon him) said: "Yes."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الحج / 8670
A woman came to the Messenger of Allah (peace and blessings be upon him) and said that her mother had vowed to perform Hajj but died before performing it; should she perform Hajj on her behalf? He (peace and blessings be upon him) said: "Yes! Perform Hajj on her behalf. What do you think: if your mother owed a debt, would you pay it?" She said: Yes! He (peace and blessings be upon him) said: "Then pay Allah as well, for He is the most deserving of fulfilment."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الحج / 8672
Abu al-Ghawth bin al-Husayn al-Khath'ami (may Allah be pleased with him) said: I said: "O Messenger of Allah! The obligation of Allah regarding Hajj has reached my father while he is very old and cannot stay seated on a camel; what do you think, shall I perform Hajj on his behalf?" He (peace and blessings be upon him) said: "Yes, perform Hajj on his behalf." I said: "O Messenger of Allah (peace and blessings be upon him)! Likewise, whoever of our family dies without having left instructions for Hajj, is Hajj to be performed on his behalf too?" He (peace and blessings be upon him) said: "Yes! And you will be rewarded." I said: "Is charity to be given and fasting to be observed on their behalf?" He (peace and blessings be upon him) said: "Yes! And charity is better; and likewise vows and walking to the mosque."
Its chain is weak.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الحج / 8673