Mishkat al-Masabih 2760
Abu Huraira reported God’s Messenger as saying that:
God is good and accepts only what is good, and He has given the same command to the believers as He has given to the Messengers, saying, “0 Messengers, eat of what is good and act righteously” (Al-Qur’an 23:51) and also, “You who believe, eat of the good things which We have provided for you” (Al-Qur’an 2:172). Then he mentioned a man who makes a long journey in a dishevelled and dusty state, who stretches out his hands to heaven saying, “My Lord, my Lord,” when his food, drink and clothing are of an unlawful nature, and he is nourished by what is unlawful, and asked how such a one could be given an answer. 

Muslim transmitted it.
وَعَنْ أَبِي هُرَيْرَةَ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: 
" إِنَّ اللَّهَ طَيِّبٌ لَا يَقْبَلُ إِلَّا طَيِّبًا وَأَنَّ اللَّهَ أَمَرَ المؤْمنينَ بِمَا أمرَ بِهِ المرسَلينَ فَقَالَ: (يَا أَيُّهَا الرُّسُلُ كُلُوا مِنَ الطَّيِّبَاتِ واعْمَلوا صَالحا)
وَقَالَ: (يَا أَيُّهَا الَّذِينَ آمَنُوا كُلُوا مِنْ طَيِّبَاتِ مَا رَزَقْنَاكُمْ)
ثُمَّ ذَكَرَ الرَّجُلَ يُطِيلُ السَّفَرَ أَشْعَثَ أَغْبَرَ يَمُدُّ يَدَيْهِ إِلَى السَّمَاءِ: يَا رَبِّ يَا رَبِّ وَمَطْعَمُهُ حَرَامٌ وَمَشْرَبُهُ حَرَامٌ وَمَلْبَسُهُ حَرَامٌ وَغُذِّيَ بِالْحَرَامِ فَأَنَّى يُسْتَجَابُ لِذَلِكَ؟ ". رَوَاهُ مُسْلِمٌ