Abu Hurayrah (may Allah be pleased with him) reported that Prophet (may Allah's peace and blessings be upon him) said: "While a man was walking on a road, he became very thirsty. He found a well and went down in it and drank. When he came out, there was a dog panting and eating moist earth out of thirst. The man said: 'This dog is so thirsty just as I was.' So, he went down into the well, filled his shoe with water and held it in his mouth until he climbed out. Then, he gave the dog water to drink. Allah accepted his deed and, thus, forgave him." They said: "O Messenger of Allah, are we rewarded for taking care of animals?" He said: "There is a reward for (quenching the thirst of) every living creature."
Another narration reads: "Allah accepted his deed and, thus, forgave him and admitted him into Paradise."
Another narration reads: "Once a dog was moving around a well, and it was about to die from thirst. When a prostitute from Children of Israel saw it, she removed her shoe, filled it with water, and gave it to the dog to drink. She was forgiven for that."
As a man was walking along the road on a journey, he became thirsty. So, he went down into a well and drank from it and quenched his thirst. When he came out of it, there was a dog eating mud (trying) to suck any water from it due to its extreme thirst. So the man said: "By Allah, this dog is just as thirsty as I was." Then he went down into the well and filled his shoe with water, holding it with his mouth to get out of the well with it, then gave the dog water to drink. Allah accepted this deed from him, forgave him, and admitted him into Paradise because of it. When the Prophet (may Allah's peace and blessings be upon him) said this Hadīth to the Companions, they asked: "O Messenger of Allah, do we get a reward for looking after animals?" i.e. Do we get reward for giving animals water to drink? He replied that there is a reward for quenching thirst of every creature with a moist liver, since the moist liver needs water, and without water it will dry up and the animal will die. Another narration states that a prostitute from Children of Israel saw a thirsty dog moving around a well, unable to reach the water. So she took off her shoe and filled it with water and gave the dog water to drink. So Allah forgave her because of that deed.