Reference: Majmoo’ Fataawa wa Rasaa.il ‘Abdul-‘Azeez ibn Baaz – Volume 16, Pages 405-406
Question: Whoever undertakes a vow to perform hajj, and subsequently dies [without having done so], and leaves no estate [from which funds can be set aside for the hajj], would the performance of hajj on his behalf be considered a recommendation or an obligation?
Response: If it is possible for someone from his heirs or other than them to perform hajj on his behalf, then that is recommended, and the one performing it is rewarded. Otherwise, there is nothing required of him (the deceased). [This is] based upon the statement of Allaah (Subhaanahu wa Ta’aala):
[This is] similar to the loan; if they are able to pay it back on his (the deceased’s) behalf, then they have done [the deceased a] good [turn], otherwise there is no harm if he has not left behind any estate.