The Messenger of Allah ﷺ said, "People, Allah has commanded the believers with what He commanded the messengers. He said, 'Messengers, eat of the good things and do righteous deeds. I am well aware of what you do' [Muminun 23:51], and He said, 'You who believe, eat of the good things We have provided for you and give thanks to Allah, if it is indeed Him you worship' [Baqarah 2:172]."Then he mentioned a man who travels far, unkempt and covered in dust, stretching out his hands to the sky, crying, "Lord! Lord!" yet his food is unlawful, his drink is unlawful, his clothing is unlawful, and he has been nourished by what is unlawful. So how could such a man be answered?
قال رسول الله ﷺ: أيها الناس! إن الله أمر المؤمنين بما أمر به المرسلين، فقال: {يا أيها الرسل كلوا من الطيبات واعملوا صالحا إني بما تعملون عليم} وقال: {يا أيها الذين آمنوا كلوا من طيبات ما رزقناكم واشكروا لله إن كنتم إياه تعبدون} [سورة البقرة: ١٧٢] ثم ذكر: الرجل يطيل السفر، أشعث أغبر، يمد يديه إلى السماء، يا رب! يا رب! ومطعمه حرام، ومشربه حرام، وملبسه حرام، وغذي بالحرام، فأني يستجاب لذلك؟
Muslim narrated it in the chapter on zakat (1015), from Abu Kurayb Muhammad bin Ala, who said, Abu Usama narrated to us, who said, Fudayl bin Marzuk narrated to us, who said, Adi bin Thabit narrated to me, from Abu Hazim, from Abu Hurairah, who said, then he mentioned it.