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

Narrated Abu Huraira:

Allah's Messenger (ﷺ) said, "While a man was walking on a road. he became very thirsty. Then he came across a well, got down into it, drank (of its water) and then came out. Meanwhile he saw a dog panting and licking mud because of excessive thirst. The man said to himself "This dog is suffering from the same state of thirst as I did." So he went down the well (again) and filled his shoe (with water) and held it in his mouth and watered the dog. Allah thanked him for that deed and forgave him." The people asked, "O Allah's Messenger (ﷺ)! Is there a reward for us in serving the animals?" He said, "(Yes) There is a reward for serving any animate (living being) ."

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