It is narrated from Sayyiduna Abu Hurayrah (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "Indeed, Allah Almighty is pure and accepts only what is pure, and Allah Almighty has commanded the believers with what He commanded the Messengers. Allah Almighty said: 'O Messengers, eat of the pure things and do righteous deeds; indeed, I am All-Knowing of what you do.' [Surah al-Mu'minun: 51] And He also said: 'O you who believe, eat of the pure things that We have provided you.' [Surah al-Baqarah: 172] Then he (peace and blessings be upon him) mentioned a man who travels at length, dishevelled and covered in dust, who stretches out his hands towards the sky and calls out, 'Ya Rabb, ya Rabb' (O my Lord, O my Lord), while his food is unlawful, his drink is unlawful, his clothing is unlawful, and he has been nourished on the unlawful; so how can his supplication be answered?"
Hadith Referenceالسنن الكبرى للبيهقي / كتاب صلاة الاستسقاء / 6394