Praise be to Allah.
Hajj is one of the pillars of Islam, one of its most important fundamentals. It is an obligation which is established according to the Book of Allaah and the Sunnah of His Messenger (peace and blessings of Allaah be upon him), and the Muslims are unanimously agreed on that.
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); and whoever disbelieves [i.e. denies Hajj (pilgrimage to Makkah), then he is a disbeliever of Allaah], then Allaah stands not in need of any of the ‘Aalameen (mankind, jinn and all that exists)”
[Aal ‘Imraan 3:97]
It was narrated that Ibn ‘Umar (may Allaah be pleased with him) said: The Messenger of Allaah (peace and blessings of Allaah be upon him) said: “Islam is built on five (pillars): testimony that there is no god but Allaah and that Muhammad is the Messenger of Allaah, establishing prayer, giving zakaah, Hajj and fasting Ramadaan.” Narrated by al-Bukhaari (8) and Muslim (16).
Hajj is only obligatory for the one who is able to do it. Being able to do it includes being able to afford it, and the physical ability to travel and perform the rituals.
No one should take out a loan in order to do Hajj, and it is not recommended to do that, but if a person goes against that ruling and takes out a loan, his Hajj is still valid, in sha Allaah.
Shaykh Ibn ‘Uthaymeen (may Allaah have mercy on him) was asked: Some people take a cash advance from the company for which they work, to be paid back in installments deducted from their salaries, in order to go for Hajj. What is your view on this?
What I think is that they should not do this, because a person is not obliged to go for Hajj if he owes a debt, so how about if he takes on a loan in order to do Hajj? I do not think that he should borrow money to go for Hajj, because in this case Hajj is not obligatory for him. So he should accept the concession granted by Allaah by His grace and mercy, and not burden himself with a loan which he does not know whether he will be able to pay off or not. Perhaps he will die without paying it off and it will remain a debt that he owes. End quote.
Majmoo’ Fataawa al-Shaykh Ibn ‘Uthaymeen, 21/93
If he takes out a loan that involves riba in order to do Hajj, then this is one of the worst of major sins.
The prohibition on riba is too well known for us to need to quote the evidence for it. Allaah says (interpretation of the meaning):
“O you who believe! Be afraid of Allaah and give up what remains (due to you) from Ribaa (from now onward) if you are (really) believers.
279. And if you do not do it, then take a notice of war from Allaah and His Messenger but if you repent, you shall have your capital sums. Deal not unjustly (by asking more than your capital sums), and you shall not be dealt with unjustly (by receiving less than your capital sums)”
[al-Baqarah 2:278, 279]
“Allaah has permitted trading and forbidden Ribaa. So whosoever receives an admonition from his Lord and stops eating Ribaa, shall not be punished for the past; his case is for Allaah (to judge); but whoever returns (to Ribaa), such are the dwellers of the Fire — they will abide therein”
It was narrated that ‘Abd-Allaah ibn Mas’ood (may Allaah be pleased with him) said: The Messenger of Allaah (peace and blessings of Allaah be upon him) cursed the one who consumes riba and the one who pays it. Narrated by Muslim, 1597
So how can a Muslim agree to commit a major sin for which Allaah has issued a warning of war, in order to do Hajj, when it is not obligatory for him if he is not able to do it?
With regard to the validity of this Hajj, it is valid even if the money with which one does Hajj is haraam, but it is not a proper Hajj.
One of the imams said:
If you do Hajj with money which comes from haraam sources, you have not done Hajj but the donkey (which you ride) has done Hajj
Allaah does not accept anything but all that is good, and not everyone who visits the House of Allaah will have his Hajj accepted.
See also question no. 34517
Al-Nawawi (may Allaah have mercy on him) said:
If a person does Hajj with haraam money or riding an animal that has been seized by force, then he is sinning although his Hajj is valid and is sufficient in our view. This is also the view of Abu Haneefah, Maalik and al-‘Abdari, and is the view of most of the fuqaha’.
The scholars of the Standing Committee were asked:
What is the ruling on one who does Hajj with haraam money, i.e., the profits of selling drugs – then they send tickets for Hajj to their parents and then do Hajj, even though some of them know that this money has been collected through dealing in drugs. Is this Hajj acceptable or not?
The fact that Hajj is done with haraam money does not mean that the Hajj is not valid, but the person is sinning by earning from haraam sources. It detracts from the reward of Hajj but it does not cancel it out altogether.
Fataawa al-Lajnah al-Daa’imah li’l-Buhooth al-‘Ilmiyyah wa’l-Ifta’, 11/43
There is a well-known hadeeth on this matter, but it is weak.
It was narrated that ‘Umar (may Allaah be pleased with him) said: The Messenger of Allaah (peace and blessings of Allaah be upon him) said: “Whoever does Hajj with haraam money and says, ‘Labbayk Allaahumma labbayk (Here I am, O Allaah, here I am),’ Allaah says: ‘I will not respond to you and your Hajj is rejected.’”
Ibn al-Jawzi said:
This is not a saheeh report from the Messenger of Allaah (peace and blessings of Allaah be upon him).
Al-‘Ilal al-Mutanaahiyah, 2/566
And Allaah knows best.