Abu Hurairah (May Allah be pleased with him) reported: Messenger of Allah (PBUH) said, "While a man was walking on his way he became extremely thirsty. He found a well, he went down into it to drink water. Upon leaving it, he saw a dog which was panting out of thirst. His tongue was lolling out and he was eating moist earth from extreme thirst. The man thought to himself: `This dog is extremely thirsty as I was.' So he descended into the well, filled up his leather sock with water, and holding it in his teeth, climbed up and quenched the thirst of the dog. Allah appreciated his action and forgave his sins". The Companions asked: "Shall we be rewarded for showing kindness to the animals also?'' He (PBUH) said, "A reward is given in connection with every living creature".
[Al-Bukhari and Muslim].
In the narration of Al-Bukhari, the Prophet (PBUH) is reported to have said: "Allah forgave him in appreciation of this act and admitted him to Jannah".
Another narration says: "Once a dog was going round the well and was about to die out of thirst. A prostitute of Banu Israel happened to see it. So she took off her leather sock and lowered it into the well. She drew out some water and gave the dog to drink. She was forgiven on account of her action".
1. This Hadith emphasizes the importance of kindness to every creature, even animals, because Allah is pleased with such kindness.
2. Allah's Quality of mercy and forgiveness is immensely vast. If He wants He may forgive a person even on a minor good action done by him.
Taken from Riyad-us-Salehin, Chapter 13