Hadithcore
Sahih al-Bukhari, 2634
sahih

Narrated Tawus:

That he was told by the most learned one amongst them (i.e. Ibn `Abbas) that the Prophet (ﷺ) went towards some land which was flourishing with vegetation and asked to whom it belonged. He was told that such and such a person took it on rent. The Prophet (ﷺ) said, "It would have been better (for the owner) if he had given it to him gratis rather than charging him a fixed rent.

حَدَّثَنَا مُحَمَّدُ بْنُ بَشَّارٍ، حَدَّثَنَا عَبْدُ الْوَهَّابِ، حَدَّثَنَا أَيُّوبُ، عَنْ عَمْرٍو، عَنْ طَاوُسٍ، قَالَ حَدَّثَنِي أَعْلَمُهُمْ، بِذَاكَ ـ يَعْنِي ابْنَ عَبَّاسٍ ـ رضى الله عنهما ـ أَنَّ النَّبِيَّ صلى الله عليه وسلم خَرَجَ إِلَى أَرْضٍ تَهْتَزُّ زَرْعًا فَقَالَ ‏"‏ لِمَنْ هَذِهِ ‏"‏‏.‏ فَقَالُوا اكْتَرَاهَا فُلاَنٌ‏.‏ فَقَالَ ‏"‏ أَمَا إِنَّهُ لَوْ مَنَحَهَا إِيَّاهُ كَانَ خَيْرًا لَهُ مِنْ أَنْ يَأْخُذَ عَلَيْهَا أَجْرًا مَعْلُومًا ‏"‏‏.‏

References2 variants
In-Book Reference
Book 51, Hadith 66
USC-MSA web (English) reference
Vol. 3, Book 47, Hadith 802 (deprecated numbering scheme)
Sharh · explanationclick to expand
All good lies in whatever benefits a person in the Hereafter, and worldly pleasures and gains will ultimately come to cease to exist when this worldly life should end. It is becoming of Muslims to hasten to perform good deeds and aspire to the reward of Allah, Exalted is He, to prepare the needed provisions for the abode of eternal bliss. In this hadeeth, the Companion ‘AbdullahNarrated Ibn ‘Abbaas (may Allah be pleased with him) that the Messenger of Allah ﷺ saw a farm which was flourishing with vegetation, indicating its large produce. He ﷺ asked to whom it belonged and was told that such and such a person took it on rent. The Prophet ﷺ advised its owner with what was better and more rewardable for him, namely to offer it as a gift for the farmer and earn the rewards of Allah, Exalted is He, in the Hereafter. The Arabic word used in the hadeeth is Al-Maneehah, which referred to a gift or what is offered to someone for free, but not as charity. .