This is a serious matter that scholars have addressed in detail. The majority of scholars, including the Hanafi, Shafi'i, and Hanbali schools, hold that the الحج technically fulfills the obligation (i.e., the person is not required to repeat it), but the person earns no reward and carries the sin of using haram wealth in worship. The Maliki school, however, holds that the الحج is not valid if funded entirely with haram money, because the ability (istitaa'ah) to perform الحج must come from lawful means.
الشيخ ابن باز stated that a Muslim must ensure their الحج is funded from lawful (halal) earnings. النبي (صلى الله عليه وسلم) said that Allah is good and accepts only that which is good. Using interest money, stolen funds, or income from prohibited activities to fund الحج contradicts the very essence of worship, which is submission to Allah through lawful means. He strongly warned against performing الحج with haram money and advised that the person should first purify their income.
Sheikh الألباني emphasized that 'الحج mabrur' (an accepted, virtuous الحج) has no reward other than Paradise, but achieving الحج mabrur requires lawful spending, good character during the الحج, and following the السنة. A person who performs الحج with stolen or interest-based money may have technically discharged the obligation (he need not repeat it), but has deprived himself of the immense reward of الحج mabrur. The person must repent, return any stolen wealth to its rightful owners, and ensure future acts of worship are funded from halal income.