Sunan an-Nasa'i, Book 44, Hadith 205 (In-Book) ⓘ
It was narrated from Jabir that: a man from among the Ansar who was called Abu (Madhkur) stated that a slave of his who was called Ya'qub was to be set free after he died, and he did not own any other property apart from him. The Messenger of Allah called for him (the slave) to be brought and he said: "Who will buy him?" Nu'aim bin 'Abdullah bought him for eight hundred dirhams, and he gave it to him and said: "If one of you is poor, let him start with himself; if there is anything left over, (let him give it) to his dependents; if there is anything left over, (let him give it) to his relatives; and if there is anything left over, (let him give it) here and there."
أَخْبَرَنَا زِيَادُ بْنُ أَيُّوبَ، قَالَ حَدَّثَنَا إِسْمَاعِيلُ، قَالَ حَدَّثَنَا أَيُّوبُ، عَنْ أَبِي الزُّبَيْرِ، عَنْ جَابِرٍ، أَنَّ رَجُلاً، مِنَ الأَنْصَارِ يُقَالُ لَهُ أَبُو مَذْكُورٍ أَعْتَقَ غُلامًا لَهُ عَنْ دُبُرٍ يُقَالُ لَهُ يَعْقُوبُ لَمْ يَكُنْ لَهُ مَالٌ غَيْرُهُ فَدَعَا بِهِ رَسُولُ اللَّهِ صلى الله عليه وسلم فَقَالَ " مَنْ يَشْتَرِيهِ " . فَاشْتَرَاهُ نُعَيْمُ بْنُ عَبْدِ اللَّهِ بِثَمَانِمِائَةِ دِرْهَمٍ فَدَفَعَهَا إِلَيْهِ وَقَالَ " إِذَا كَانَ أَحَدُكُمْ فَقِيرًا فَلْيَبْدَأْ بِنَفْسِهِ فَإِنْ كَانَ فَضْلاً فَعَلَى عِيَالِهِ فَإِنْ كَانَ فَضْلاً فَعَلَى قَرَابَتِهِ أَوْ عَلَى ذِي رَحِمِهِ فَإِنْ كَانَ فَضْلاً فَهَا هُنَا وَهَا هُنَا " .
also referenced under: Hadith 4653 (Reference) & Volume 5, Book 44, Hadith 4657 (DarusSalam)