Abu Hurairah reported,

The Messenger of Allah ﷺ said, "People, Allah is pure and accepts only what is pure. Allah has commanded the believers with the same command He gave to the messengers. He said, 'Messengers, eat from the good things and do righteous deeds. Indeed, I am well aware of what you do' [Muminun 23:51], and He said, 'You who believe, eat from the good things We have provided for you' [Baqarah 2:172]."Then he mentioned a man who travels far, disheveled and dust-covered, stretching 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 can his prayer be answered?

Tirmidhi 2989

Sahih

حدثنا عبد بن حميد حدثنا أبو نعيم حدثنا فضيل بن مرزوق عن عدي بن ثابت عن أبي حازم

عن أبي هريرة قال

قال رسول الله ﷺ يا أيها الناس إن الله طيب لا يقبل إلا طيبا وإن الله أمر المؤمنين بما أمر به المرسلين فقال {يا أيها الرسل كلوا من الطيبات واعملوا صالحا إني بما تعملون عليم} وقال {يا أيها الذين آمنوا كلوا من طيبات ما رزقناكم} قال وذكر الرجل يطيل السفر أشعث أغبر يمد يده إلى السماء يا رب يا رب ومطعمه حرام ومشربه حرام وملبسه حرام وغذي بالحرام فأنى يستجاب لذلك

الترمذي 2989صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami Tirmidhi
Book
Tafsir of the Quran
Chapter
From Surah Baqarah
Numbering
Darussalam 2989
Tirmidhi 2989