Suuratul Baqarah Verse 267.
يَـٰٓأَيُّهَا ٱلَّذِينَ ءَامَنُوٓا۟ أَنفِقُوا۟ مِن طَيِّبَـٰتِ مَا كَسَبْتُمْ وَمِمَّآ أَخْرَجْنَا لَكُم مِّنَ ٱلْأَرْضِ ۖ
وَلَا تَيَمَّمُوا۟ ٱلْخَبِيثَ مِنْهُ تُنفِقُونَ وَلَسْتُم بِـَٔاخِذِيهِ إِلَّآ أَن تُغْمِضُوا۟ فِيهِ ۚ وَٱعْلَمُوٓا۟ أَنَّ ٱللَّـهَ غَنِىٌّ حَمِيدٌ ﴿٢٦٧
267. O you who believe! Spend of the good things which you have (legally) earned, and of that which We have produced from the earth for you, and do not aim at that which is bad to spend from it, (though) you would not accept it save if you close your eyes and tolerate therein. And know that Allah is Rich (Free of all wants), and Worthy of all praise.
Tafsir Ibn Kathir
Allah commands His believing servants to spend in charity, as Ibn `Abbas stated, from the pure, honest money that they earned and from the fruits and vegetables that He has grown for them in the land. Ibn `Abbas said, “Allah commanded them to spend from the purest, finest and best types of their money and prohibited spending from evil and dishonest money, because Allah is pure and good and only accepts that which is pure and good.” This is why Allah said,
وَلاَ تَيَمَّمُواْ الْخَبِيثَ
(and do not aim at that which is bad) meaning, filthy (impure) money,
مِنْهُ تُنفِقُونَ وَلَسْتُم بِأَخِذِيهِ
(to spend from it, (though) you would not accept it) meaning, “If you were given this type, you would not take it, except if you tolerate the deficiency in it. Verily, Allah is far Richer than you, He is in no need of this money, so do not give, for His sake, what you would dislike for yourselves.” It was reported that,
وَلاَ تَيَمَّمُواْ الْخَبِيثَ مِنْهُ تُنفِقُونَ
(and do not aim at that which is bad to spend from it) means, “Do not spend from the dishonest, impure money instead of the honest, pure money.”