Sahl bin Hanzaliya reported,

The Messenger of Allah ﷺ went out on some errand and passed by a camel kneeling at the door of the mosque early in the day. He then passed by it again at the end of the day, and it was still in the same condition. He asked, "Where is the owner of this camel?" The owner was sought but could not be found.The Messenger of Allah ﷺ then said, "Fear Allah regarding these animals. Ride them while they are sound, and eat them while they are fat." This is part of the hadith.In another wording, the Messenger of Allah ﷺ passed by a camel whose back had become joined to its belly, and he said, "Fear Allah regarding these mute beasts. Ride them while they are in good health."

Azami 14798

Sahih

عن سهل بن الحنظلية الأنصاري صاحب رسول الله ﷺ قال

خرج رسول الله ﷺ الله في حاجة فمر ببعير مناخ على باب المسجد من أول النهار، ثم مر به آخر النهار، وهو على حاله فقال: أين صاحب هذا البعير؟ فابتغي فلم يوجد، فقال رسول الله ﷺ: اتقوا الله في هذه البهائم ثم اركبوها صحاحا وكلوها سمانا… الحديث. وفي لفظ: مر رسول الله ﷺ ببعير قد لحق ظهره ببطنه، فقال: اتقوا الله في هذه البهائم المعجمة، فاركبوها صالحة.

الأعظمي 14798صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Superior moral conduct
Chapter
Kindness to animals
Section
Kindness to animals and caring for them at home and on journeys
Numbering
Jami al-Kamil 14798 (2nd edition)
Azami 14798