It is narrated from Abu Rafi’ (may Allah be pleased with him) that the Messenger of Allah (ﷺ) borrowed a camel from a man. Later, camels for zakat came to the Prophet (ﷺ), so he (ﷺ) ordered me to return the man's camel to him.
Hadith Referenceمسند الإمام الشافعي / كتاب البيوع / 1447
Hadith Takhrijاخرجه مسلم البيوع، باب جواز اعتراض اقتراض الحيوان و استحباب توفيته خيرًا مما عليه (1600)۔
The freed slave of the Messenger of Allah ﷺ, Abu Rafi’ (may Allah be pleased with him), narrated that the Messenger of Allah ﷺ borrowed a camel. Then camels for zakat came to him ﷺ. Abu Rafi’ said: The Messenger of Allah ﷺ ordered me to return the man's camel. When I said: O Messenger of Allah! I can only find an excellent four-year-old camel, the Messenger of Allah ﷺ said: “Give it to him; the best among people is the one who is best in repaying debts.”
Hadith Referenceمسند الإمام الشافعي / كتاب البيوع / 1448