Jābir ibn ‘Abdullāh (may Allah be pleased with him) reported that a man from the Ansār declared that a slave of his would be free after his death. Another version says that the Prophet (may Allah's peace and blessings be upon him) was told that a man from his Companions declared that a slave of his would be free after his own death although he had no property other than him (this slave). So, the Prophet sold him for eight hundred dirhams and sent the money to him.
عن جابر بن عبد الله -رضي الله عنهما- قال: دَبَّرَ رَجُلٌ مِنْ الأَنْصَارِ غُلاماً لَهُ-، وَفِي لَفْظٍ: بَلَغَ النَّبِيَّ -صلى الله عليه وسلم-: أَنَّ رَجُلاً مِنْ أَصْحَابِهِ أَعْتَقَ غُلاماً لَهُ عنْ دُبُرٍ- لَمْ يَكُنْ لَهُ مَالٌ غَيْرُهُ فَبَاعَهُ رَسُولُ الله بِثَمَانِمِائَةِ دِرْهَمٍ، ثُمَّ أَرْسَلَ ثَمَنَهُ إلَيْهِ.
شرح الحديث :
A man from the Ansār promised that a slave that he owned would be free after his own death although the master had no other property. As the Prophet (may Allah's peace and blessings be upon him) was told of this, he considered this deal a waste of resources. So, he did not approve of this act. Meanwhile, he sold the slave for eight hundred dirhams and sent the money to the master. The priority for the poor master was to take care of himself and his family rather than emancipate his productive slave, and thus the indigent family would survive on begging. Finally, even though this tradition was applicable at some point in history and has no relevance today, something can be learned from it. Slavery is still practiced in some places like Africa, just as it was practiced since the time of Adam until after the coming of Islam. However, the attitude of Islam toward slavery is to eliminate it.