"A slave came to give the pledge to the Prophet ﷺ for Hijrah, but the Prophet ﷺ did not realize that he was a slave. So his master came to get him and the Prophet ﷺ said: 'Sell him to me.' So he purchased him for two black slaves. Then he would not pledge from anyone until he asked him if he was a slave." [He said:] There is something on this topic from Anas.
جَاءَ عَبْدٌ فَبَايَعَ النَّبِيَّ ﷺ عَلَى الْهِجْرَةِ وَلاَ يَشْعُرُ النَّبِيُّ ﷺ أَنَّهُ عَبْدٌ فَجَاءَ سَيِّدُهُ يُرِيدُهُ فَقَالَ النَّبِيُّ ﷺ بِعْنِيهِ فَاشْتَرَاهُ بِعَبْدَيْنِ أَسْوَدَيْنِ ثُمَّ لَمْ يُبَايِعْ أَحَدًا بَعْدُ حَتَّى يَسْأَلَهُ أَعَبْدٌ هُوَ قَالَ وَفِي الْبَابِ عَنْ أَنَسٍ