Jabir bin Abdullah reported,

A slave came and pledged allegiance to the Prophet ﷺ on emigration, without the Prophet ﷺ realizing that he was a slave. Then his master came looking for him, so the Prophet ﷺ said to him, "Sell him to me." He bought him in exchange for two black slaves, and after that he would not accept anyone's pledge of allegiance until he had asked whether he was a slave.

Azami 5892

Sahih

عن جابر بن عبد الله قال

جاء عبد، فبايع النبي ﷺ على الهجرة، ولم يشعر أنه عبد، فجاء سيده يريده، فقال له النبي ﷺ: بعنيه. فاشتراه بعبدين أسودين، ثم لم يبايع أحدا بعد حتى يسأله أعبد هو؟

الأعظمي 5892صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Sales
Chapter
Prohibited sales
Section
Permissibility of unequal exchange in selling male and female slaves if it is hand to hand
Numbering
Jami al-Kamil 5892 (2nd edition)
Azami 5892