Fiqh-us-Sunnah Volume 5, Hajj and ‘Umrah, Fiqh 5.015B.
Someone performing Hajj with unlawfully gained money, may technically fulfil his prescribed duty of pilgrimage, but according to the majority of the scholars, he will be guilty of sin for doing so. Imam Ahmad disagrees and holds that such a Hajj is not enough for a person to absolve him of his prescribed obligation, and this is more correct as the sahih hadith says: “Surely, Allah is Pure, and He does not accept anything but what is pure (and clean).” Also it is reported by Abu Hurairah that the Prophet (peace be upon him) said: “As soon as a pilgrim sets out for Hajj with a provision which is lawful, and puts his foot in the stirrup (rides his mount) and calls out: ‘O, Allah! Here I am in response to Your call,’ an announcer answers him from the heavens above, saying: ‘Your call has been heard; you are a happy one; your provisions are lawful, your mount is lawful and your pilgrimage is free of sin and acceptable.’ But, if his provisions are unlawfully gained, and he puts his foot in the stirrup and calls out: ‘O Allah! Here I am in response to Your call,’ an announcer from the heavens above answers him back, saying: ‘Your call is not accepted; nor are you welcome; your food is unlawful; your provisions are unlawful; and your pilgrimage is not free of sin and is unacceptable.”‘ Al-Munzhri says: “This is reported by At-Tabarani in Al-Awsat, and also by Al-Asbahani in a mursal hadith from Aslam, the freed slave of ‘Umar bin al-Khattab.”