Abu Hurairah reported,

The Messenger of Allah ﷺ said, "While a man was walking along a road, he became severely thirsty. He found a well, climbed down into it, drank, and came back out. Then he saw a dog panting and licking the moist earth out of thirst. The man said to himself, 'This dog has been afflicted with thirst just as I was.' So he climbed down into the well, filled his leather sock with water, held it in his mouth, climbed up, and gave the dog a drink. Allah was grateful to him for this and forgave him."The companions asked, "Messenger of Allah, do we receive a reward for showing kindness to animals?"He replied, "Yes, in every living creature with a moist liver there is a reward."

Bukhari 6009

Sahih

حدثنا إسماعيل حدثني مالك عن سمي مولى أبي بكر عن أبي صالح السمان

عن أبي هريرة

أن رسول الله ﷺ قال بينما رجل يمشي بطريق اشتد عليه العطش فوجد بئرا فنزل فيها فشرب ثم خرج فإذا كلب يلهث يأكل الثرى من العطش فقال الرجل لقد بلغ هذا الكلب من العطش مثل الذي كان بلغ بي فنزل البئر فملأ خفه ثم أمسكه بفيه فسقى الكلب فشكر الله له فغفر له قالوا يا رسول الله وإن لنا في البهائم أجرا فقال نعم في كل ذات كبد رطبة أجر

البخاري 6009صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Manners
Chapter
Mercy toward people and animals
Numbering
Darussalam 6009
Bukhari 6009