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)۔