Language:
كتاب الأدب
78  
Good Manners and Form (Al-Adab)
(27)
Chapter: Being merciful to the people and to the animals
(27)
باب رَحْمَةِ النَّاسِ وَالْبَهَائِمِ
Sahih al-Bukhari 6012

Narrated Anas bin Malik:

The Prophet (ﷺ) said, "If any Muslim plants any plant and a human being or an animal eats of it, he will be rewarded as if he had given that much in charity."

حَدَّثَنَا أَبُو الْوَلِيدِ، حَدَّثَنَا أَبُو عَوَانَةَ، عَنْ قَتَادَةَ، عَنْ أَنَسِ بْنِ مَالِكٍ، عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ ‏ "‏ مَا مِنْ مُسْلِمٍ غَرَسَ غَرْسًا فَأَكَلَ مِنْهُ إِنْسَانٌ أَوْ دَابَّةٌ إِلاَّ كَانَ لَهُ صَدَقَةً ‏"‏‏.‏
Reference : Sahih al-Bukhari 6012
In-book reference : Book 78, Hadith 43
USC-MSA web (English) reference : Vol. 8, Book 73, Hadith 41
  (deprecated numbering scheme)