A woman from Juhaynah came to the Prophet ﷺ and said, "My mother vowed to perform Hajj but did not do so before she died. Should I perform Hajj on her behalf?"He replied, "Yes, perform Hajj on her behalf. Tell me, if your mother had a debt, would you not pay it off? Pay back what is owed to Allah, for Allah is more deserving of fulfillment."
أن امرأة من جهيئة جاءت إلى النبي ﷺ فقالت: إن أمي نذرت أن تحج فلم تحج حتى ماتت أفأحج عنها؟ قال: نعم حجي عنها، أرأيت لو كان على أمك دين أكنت قاضيته؟ اقضوا الله، فالله أحق بالوفاء.
Bukhari related it in the Chapter on the Penalty for Game (1852), from Musa bin Ismail, who said, Abu Awana (who is al-Waddah al-Yashkuri) narrated to us, from Abu Bishr (who is Jafar bin Iyas), from Saeed bin Jubayr, from Ibn Abbas, with this chain, and he mentioned it.