Praise be to Allah.
If a man needs to get married, and it will be too difficult for him to delay that, then he should give marriage precedence over Hajj.
But if he does not need to get married, then he should give precedence to Hajj.
Ibn Qudaamah (may Allaah have mercy on him) said in al-Mughni (5/12):
If he needs to get married and he fears that it will be too difficult for him otherwise, then he should give priority to that, because it is obligatory for him and he cannot do without it, so it becomes part of his essential spending. But he has no such fears, then he should give priority to Hajj, because marriage is voluntary and should not take precedence over Hajj which is obligatory.
See also al-Majmoo’ (7/71) by al-Nawawi.
Shaykh Ibn ‘Uthaymeen (may Allaah have mercy on him) was asked:
Is it permissible to delay Hajj until after marriage for one who is able to do it? That is because of the temptations both great and small that young men are faced with these days.
Undoubtedly marriage when one has a strong desire for it takes precedence over Hajj, because if a man has a strong desire to get married, in his case marriage is a necessity of life for him, and is like food and drink. Hence it is permissible for the one who needs to get married and does not have money to be given some of the zakaah funds in order to get married, just as a poor man may be given food and clothing to cover his ‘awrah from the zakaah.
On this basis we say: If he needs to get married, then he should give marriage precedence over Hajj, because Allaah has stated that one of the conditions of Hajj being obligatory is that one is able to afford it. Allaah says (interpretation of the meaning):
“And Hajj (pilgrimage to Makkah) to the House (Ka‘bah) is a duty that mankind owes to Allaah, those who can afford the expenses (for one’s conveyance, provision and residence)”
[Aal ‘Imraan 3:97]
But if he is a young man and it does not matter to him if he gets married this year or next year, then he should give precedence for Hajj because marriage is not a priority for him.
Fataawa Manaar al-Islam, 2/375.