Sunan an Nasai 4621
The Book of Financial Transactions
أَخْبَرَنَا قُتَيْبَةُ، قَالَ حَدَّثَنَا اللَّيْثُ، عَنْ أَبِي الزُّبَيْرِ، عَنْ جَابِرٍ، قَالَ جَاءَ عَبْدٌ فَبَايَعَ رَسُولَ اللَّهِ صلى الله عليه وسلم عَلَى الْهِجْرَةِ وَلاَ يَشْعُرُ النَّبِيُّ صلى الله عليه وسلم أَنَّهُ عَبْدٌ فَجَاءَ سَيِّدُهُ يُرِيدُهُ فَقَالَ النَّبِيُّ صلى الله عليه وسلم " بِعْنِيهِ " . فَاشْتَرَاهُ بِعَبْدَيْنِ أَسْوَدَيْنِ ثُمَّ لَمْ يُبَايِعْ أَحَدًا بَعْدُ حَتَّى يَسْأَلَهُ أَعَبْدٌ هُوَ
It was narrated that Jabir Sair:"A slave came and gave his pledge to the Messenger of Allah to emigrate, and the Prophet did not realize that he was a slave. Then his master came looking for him. The Prophet said; 'Sell him to me.' So he bought him for two black slaves, then he did not accept until he had asked; 'Is he a slave?
Grading: Abu Ghuddah: Sahih · Al-Albani: Sahih · Zubair Ali Zai: Hasan
Text from the public-domain hadith-api dataset. Numbering follows that dataset and can differ by a few from some printed editions — check the wording, not only the number.