The eminent Muslim scholar Dr. Sabri `Abder-Ra’ouf Muhammad, professor of comparative fiqh at Al-Azhar University and a member of the Supreme Council for Islamic Affairs, states the following:
Allah Almighty says: (Pilgrimage thereto is a duty men owe to Allah, those who can afford the journey) (Aal `Imran 3:97). This verse asserts that Hajj is obligatory only on those who can afford the journey to the Sacred House. If the deceased has left a will that someone performs Hajj on his or her behalf, one of the heirs should do it. If the deceased has left no such will, the heirs may or may not perform Hajj on his or her behalf. In either case, it is agreed upon among fiqh scholars that the person who will perform Hajj on behalf of the deceased must have performed Hajj on his or her own behalf.
In this regard it was reported that the Prophet (peace and blessings be upon him) heard a man saying, “O Allah! Here I am at Your service on behalf of Shubrumah.” The Prophet (peace and blessings be upon him) asked him, “Who is Shubrumah?” He replied, “A brother (or a relative) of mine.” The Prophet then asked again, “Have you performed Hajj on your own behalf?” The man replied, “No,” whereupon the Prophet (peace and blessings be upon him) said, “You must perform Hajj on your own behalf first, and then you may perform Hajj on Shubrumah’s.”
As for performing `Umrah for oneself before performing Hajj on someone else’s behalf, fiqh scholars do not regard the former as a prerequisite for the latter. This is because Hajj is obligatory, while `Umrah is voluntary. The Prophet (peace and blessings be upon him) said, “Hajj is (a kind) of jihad, and `Umrah is a voluntary act.”