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