Messenger of Allah ﷺ said, " Horses are kept for one of three purposes: A man may keep them (for Allah's Cause) to receive a reward in the Hereafter; another may keep them as a means of protection; and a third may keep them to be a burden for him. As for the man for whom the horse is a source of reward, he is the one who ties it for Allah's Cause, and he ties it with a long rope in a pasture or a garden, then, whatever it eats or drinks in that pasture or garden will be added to his good deeds. And if it breaks its rope and jumps over one or two hills, then, for all its footsteps and its manure, good deeds will be written for him. And if it passes by a river and drinks of its water though its owner had no intention to water it from that river, even then he will have good deeds written for him. So that horse will be (a source of) reward for such a man. If a man ties a horse for earning his livelihood and abstaining from asking others for help and he does not forget Allah's right, i.e. pays its Zakat and gives it to be used in Allah's Cause, then that horse will be a means of protection for him. But if a man ties it out of pride and to show off and to excite others, then that horse will be a burden (of sins) for him." Then Messenger of Allah ﷺ was asked regarding donkeys. He replied, "Nothing has been revealed to me except this comprehensive Verse which includes everything: 'So whoever does good equal to the weight of an atom (or a smallest ant) shall see it; and whoever does evil equal to the weight of an atom (or a smallest ant) shall see it.' (99.7-8)
أَنَّ رَسُولَ اللَّهِ ﷺ قَالَ الْخَيْلُ لِثَلاَثَةٍ لِرَجُلٍ أَجْرٌ وَلِرَجُلٍ سِتْرٌ وَعَلَى رَجُلٍ وِزْرٌ فَأَمَّا الَّذِي لَهُ أَجْرٌ فَرَجُلٌ رَبَطَهَا فِي سَبِيلِ اللَّهِ فَأَطَالَ لَهَا فِي مَرْجٍ أَوْ رَوْضَةٍ فَمَا أَصَابَتْ فِي طِيَلِهَا ذَلِكَ فِي الْمَرْجِ وَالرَّوْضَةِ كَانَ لَهُ حَسَنَاتٍ وَلَوْ أَنَّهَا قَطَعَتْ طِيَلَهَا فَاسْتَنَّتْ شَرَفًا أَوْ شَرَفَيْنِ كَانَتْ آثَارُهَا وَأَرْوَاثُهَا حَسَنَاتٍ لَهُ وَلَوْ أَنَّهَا مَرَّتْ بِنَهَرٍ فَشَرِبَتْ مِنْهُ وَلَمْ يُرِدْ أَنْ يَسْقِيَ بِهِ كَانَ ذَلِكَ حَسَنَاتٍ لَهُ فَهْىَ لِذَلِكَ الرَّجُلِ أَجْرٌ وَرَجُلٌ رَبَطَهَا تَغَنِّيًا وَتَعَفُّفًا وَلَمْ يَنْسَ حَقَّ اللَّهِ فِي رِقَابِهَا وَلاَ ظُهُورِهَا فَهْىَ لَهُ سِتْرٌ وَرَجُلٌ رَبَطَهَا فَخْرًا وَرِئَاءً وَنِوَاءً فَهْىَ عَلَى ذَلِكَ وِزْرٌ فَسُئِلَ رَسُولُ اللَّهِ ﷺ عَنِ الْحُمُرِ قَالَ مَا أَنْزَلَ اللَّهُ عَلَىَّ فِيهَا إِلاَّ هَذِهِ الآيَةَ الْفَاذَّةَ الْجَامِعَةَ {فَمَنْ يَعْمَلْ مِثْقَالَ ذَرَّةٍ خَيْرًا يَرَهُ * وَمَنْ يَعْمَلْ مِثْقَالَ ذَرَّةٍ شَرًّا يَرَهُ}