Abu Madhkur freed a slave of his named Yaqub through a deferred manumission, and he had no other property besides him. The Messenger of Allah ﷺ called for the slave and asked, "Who will buy him?" Naeem bin Abdullah bin Nahham bought him for eight hundred dirhams, and the Messenger of Allah ﷺ handed the money over to him.Then he said, "When one of you is poor, let him begin with himself. If there is anything left over, then on his dependents. If there is still anything left over, then on his relatives," or he said, "on his kin. If there is still anything left, then here and there."
حدثنا أحمد بن حنبل حدثنا إسمعيل بن إبراهيم حدثنا أيوب عن أبي الزبير
له أبو مذكور أعتق غلاما له يقال له يعقوب عن دبر ولم يكن له مال غيره فدعا به رسول الله ﷺ فقال من يشتريه فاشتراه نعيم بن عبد الله بن النحام بثمان مائة درهم فدفعها إليه ثم قال إذا كان أحدكم فقيرا فليبدأ بنفسه فإن كان فيها فضل فعلى عياله فإن كان فيها فضل فعلى ذي قرابته أو قال على ذي رحمه فإن كان فضلا فهاهنا وهاهنا
Muslim narrated it in the Book of Zakat, in the chapter on beginning charitable spending with oneself, then one's family, then relatives, hadith no. 997, from the hadith of Ismail bin Ulaya, through this route, and it is also found in Musnad Ahmad, 3/305.