Can We Take a Loan for Hajj?
Question

In recent times, there have been many ads from travel companies which organize trips for Hajj and ‘Umrah, in which they say that the costs of travel may be paid in installments so as to make things easier for those who want to go for Hajj and ‘Umrah, and so as to attract more of them especially in the state of recession which is affecting many countries when many citizens have a reduced cash flow. 
Some companies have also announced that they will accept payments by credit card.
My question is: what is the Islamic ruling on one who does Hajj and ‘Umrah in this manner? Is Hajj or ‘Umrah valid in this case, especially since some jurists have issued fatwas stating that it is permissible to finance Hajj by means of loans which are paid off in installments as a kind of making things easier at a time when travel costs are so high?
Praise be to Allah.Is hajj obligatory?
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 Allah and the Sunnah of His Messenger (peace and blessings of Allah be upon him), and the Muslims are unanimously agreed on that. 
Allah says (interpretation of the meaning): 
“And Hajj (pilgrimage to Makkah) to the House (Ka‘bah) is a duty that mankind owes to Allah, 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 Allah], then Allah stands not in need of any of the ‘Alamهn (mankind, jinn and all that exists).” [Al ‘Imran 3:97]
Ibn `Umar (may Allah be pleased with him) said: The Messenger of Allah (peace and blessings of Allah be upon him) said: “Islam is built on five (pillars): testimony that there is no god but Allah and that Muhammad is the Messenger of Allah, establishing prayer, giving zakah, Hajj and fasting Ramadan.” (Narrated by al-Bukhari (8) and Muslim (16)
Can we take a loan for hajj?
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 Allah. 
Shaykh Ibn ‘Uthaymin (may Allah 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?  
He replied: 
“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 Allah 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.” (Majmu’ Fatawa al-Shaykh Ibn ‘Uthaymin, 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. Allah says (interpretation of the meaning): 
“O you who believe! Be afraid of Allah and give up what remains (due to you) from Riba (from now onward) if you are (really) believers. And if you do not do it, then take a notice of war from Allah 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]
“Allah has permitted trading and forbidden Riba. So whosoever receives an admonition from his Lord and stops eating Riba, shall not be punished for the past; his case is for Allah (to judge); but whoever returns (to Riba), such are the dwellers of the Fire — they will abide therein.” [al-Baqarah 2:275]
‘Abd-Allah ibn Mas’oud (may Allah be pleased with him) said: The Messenger of Allah (peace and blessings of Allah 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 Allah 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? 
In the answer to question No.  11179  we have discussed the prohibition on credit loans and explained that they are a form of riba. 
With regard to the validity of this Hajj, it is valid even if the money with which one does Hajj is haram , but it is not a proper Hajj. 
One of the imams said: 
If you do Hajj with money which comes from haram sources, you have not done Hajj but the donkey (which you ride) has done Hajj
Allah does not accept anything but all that is good, and not everyone who visits the House of Allah will have his Hajj accepted.
Al-Nawawi (may Allah have mercy on him) said: 
“If a person does Hajj with haram 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 Hanifah, Malik and al-‘Abdari, and is the view of most of the jurists.” (Al-Majmu’, 7/40) 
The scholars of the Standing Committee were asked: 
What is the ruling on one who does Hajj with haram 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? 
They replied: 
“The fact that Hajj is done with haram money does not mean that the Hajj is not valid, but the person is sinning by earning from haram sources. It detracts from the reward of Hajj but it does not cancel it out altogether.” (Fatawa al-Lajnah al-Daimah li’l-Buhuth al-‘Ilmiyyah wa’l-Ifta, 11/43) 
There is a well-known hadith on this matter, but it is weak. 
`Umar (may Allah be pleased with him) said: The Messenger of Allah (peace and blessings of Allah be upon him) said: “Whoever does Hajj with haram money and says, ‘Labbayk Allahumma labbayk (Here I am, O Allah, here I am),’ Allah says: ‘I will not respond to you and your Hajj is rejected.’” 
Ibn al-Jawzi said: 
“This is not a sahih report from the Messenger of Allah (peace and blessings of Allah be upon him).” (Al-‘Ilal al-Mutanahiyah, 2/566)
And Allah knows best.