Abu Hurairah reported,

The Messenger of Allah ﷺ said, "Horses are of three kinds. For one man they bring reward, for another they are a covering, and upon a third they are a burden.As for the one who earns reward through them, it is the man who tethers his horse in the cause of Allah, leaving it in a meadow or garden with a long rope. Whatever the horse grazes upon within the length of that rope from the meadow or garden becomes good deeds for him. If it breaks loose and gallops up a rise or two, its dung and hoofprints become good deeds for him. And if it passes by a river and drinks from it, even though he did not intend to water it, that too becomes good deeds for him.The second is a man who tethers his horse out of pride, showing off, and hostility toward the people of Islam. For him the horse is a burden."The Messenger of Allah ﷺ was then asked about donkeys, and he replied, "Nothing has been revealed to me concerning them except this comprehensive, unique verse, 'So whoever does an atom's weight of good will see it, and whoever does an atom's weight of evil will see it'" [Zalzalah 99:7–8].

Bukhari 2860

Sahih

حدثنا عبد الله بن مسلمة عن مالك عن زيد بن أسلم عن أبي صالح السمان

عن أبي هريرة رضي الله عنه

أن رسول الله ﷺ قال الخيل لثلاثة لرجل أجر ولرجل ستر وعلى رجل وزر فأما الذي له أجر فرجل ربطها في سبيل الله فأطال في مرج أو روضة فما أصابت في طيلها ذلك من المرج أو الروضة كانت له حسنات ولو أنها قطعت طيلها فاستنت شرفا أو شرفين كانت أرواثها وآثارها حسنات له ولو أنها مرت بنهر فشربت منه ولم يرد أن يسقيها كان ذلك حسنات له ورجل ربطها فخرا ورئاء ونواء لأهل الإسلام فهي وزر على ذلك وسئل رسول الله ﷺ عن الحمر فقال ما أنزل علي فيها إلا هذه الآية الجامعة الفاذة {فمن يعمل مثقال ذرة خيرا يره ومن يعمل مثقال ذرة شرا يره}

البخاري 2860صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Jihad and expeditions
Chapter
Horses are for three types of people
Numbering
Darussalam 2860
Bukhari 2860