Narrated Abu Huraira
The Prophet (ﷺ) said, "A horse may be kept for one of three purposes: for a man it may be a source of reward; for another it may be a means of living; and for a third it may be a burden (a source of committing sins). As for the one for whom it is a source of reward, he is the one who keeps his horse for the sake of Jihad in Allah's Cause; he ties it with a long rope on a pasture or in a garden. So whatever its rope allows it to eat, will be regarded as good rewardable deeds (for its owner). And if it breaks off its rope and jumps over one or two hillocks, even its dung will be considered amongst his good deeds. And if it passes by a river and drinks water from it, that will be considered as good deeds for his benefit) even if he has had no intention of watering it. A horse is a shelter for the one who keeps it so that he may earn his living honestly and takes it as a refuge to keep him from following illegal ways (of gaining money), and does not forget the rights of Allah (i.e. paying the Zakat and allowing others to use it for Allah's Sake). But a horse is a burden (and a source of committing sins for him who keeps it out of pride and pretense and with the intention of harming the Muslims." The Prophet (ﷺ) was asked about donkeys. He replied, "Nothing has been revealed to be concerning them except this comprehensive Verse (which covers everything) :--'Then whosoever has done good equal to the weight of an atom (or a small ant), Shall see it (its reward) And whosoever has done evil equal to the weight of an atom (or a small ) ant), Shall see it (Its punishment)." (99.7-8)