Ibn `Abbas (May Allah be pleased with them) reported: A woman came to the Messenger of Allah and said, “Allah’s obligation upon His slaves has become obligatory on my father in his old age. My father is very old and incapable of riding. May I perform Hajj on his behalf?” He (PBUH) said, “Yes.”
[Al-Bukhari and Muslim].
Commentary: “Hajj has become obligatory in old age” means that when Allah has made Hajj obligatory, at that time, her father had attained old age, or he came to possess the means in his old age which made him liable for Hajj, but he is not capable of undertaking the journey because of his poor health. In such cases, the Prophet (PBUH) has granted them permission for Hajj by representation. But we learn from other Ahadith that Hajj by representation can only be done through such a person who has already performed Hajj. Similarly, if a person of means dies without performing Hajj, it is essential that Hajj is performed on his behalf; otherwise, he will be answerable for this omission. This formula does not apply to parents who have died in poverty because they were not liable for it. If someone does it for the sake of reward, he will be hopefully granted the reward of voluntary Hajj.