It is narrated from al-Hasan (may Allah have mercy on him) regarding a man who bequeaths that Hajj be performed on his behalf. He said: If he had already performed Hajj, the bequest will be fulfilled from the third; and if he had not performed Hajj, the Hajj will be performed from all his wealth, whether he made a bequest or not. It is a debt upon him.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الوصايا / 12599