Sunan an-Nasa'i, Book 21, Hadith 142 (In-Book)

It was narrated from 'Imran bin Husain that: a man freed six slaves of his when he was dying, and he did not have any wealth apart from them. News of that reached the Prophet and he was angry about that. He said: "I was thinking of not offering the funeral prapyer for him." Then he called the slaves and divided them into three groups. He cast lost among them, then freed two and left four as slaves.

أَخْبَرَنَا عَلِيُّ بْنُ حُجْرٍ، قَالَ أَنْبَأَنَا هُشَيْمٌ، عَنْ مَنْصُورٍ، - وَهُوَ ابْنُ زَاذَانَ - عَنِ الْحَسَنِ، عَنْ عِمْرَانَ بْنِ حُصَيْنٍ، أَنَّ رَجُلاً، أَعْتَقَ سِتَّةً مَمْلُوكِينَ لَهُ عِنْدَ مَوْتِهِ وَلَمْ يَكُنْ لَهُ مَالٌ غَيْرَهُمْ فَبَلَغَ ذَلِكَ النَّبِيَّ صلى الله عليه وسلم فَغَضِبَ مِنْ ذَلِكَ وَقَالَ ‏ "‏ لَقَدْ هَمَمْتُ أَنْ لاَ أُصَلِّيَ عَلَيْهِ ‏" ‏ ‏.‏ ثُمَّ دَعَا مَمْلُوكِيهِ فَجَزَّأَهُمْ ثَلاَثَةَ أَجْزَاءٍ ثُمَّ أَقْرَعَ بَيْنَهُمْ فَأَعْتَقَ اثْنَيْنِ وَأَرَقَّ أَرْبَعَةً ‏.‏

sunnah.com