All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger.
The Muslim should know that one who consumes unlawful money is in a great danger. Abu Hurayrah narrated that the Messenger of Allaah, sallallaahu ‘alayhi wa sallam, said:
"O People! Allaah is Tayyib (Pure), and He only accepts that which is pure! Allaah has commanded the believers what He has commanded the Messengers, for He said: {O messengers, eat from the good foods and work righteousness. Indeed, I, of what you do, am Knowing} and He said, {Eat from the good things with which We have provided you.}”
Then the Prophet, sallallaahu ‘alayhi wa sallam, mentioned a traveler, who is disheveled and dusty, on a long journey, and he stretches forth his hands to the sky, saying: “O my Lord! O my Lord!” while his food is unlawful, his drink is unlawful, his clothing is unlawful, and he is nourished unlawfully; how can he (expect to) be answered? [At-Tirmithi]
Although consuming this money that is earned from mixed – lawful and unlawful – sources is a sinful act, the preponderant opinion is that performing Hajj with the money mentioned in the question is valid. This is the opinion of the majority of scholars including Abu Haneefah, Maalik, Ash-Shaafi‘i and Ahmad in a report narrated from him that was adopted by competent, researching scholars from among his companions.
Allaah Knows best.