Jabir bin Abdullah reported,

A slave came and pledged allegiance to the Prophet ﷺ for emigration, and the Prophet ﷺ did not realize 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. After that, he would not accept the pledge of allegiance from anyone without first asking whether he was a slave.

Muslim 4113

Sahih

حدثنا يحيى بن يحيى التميمي وابن رمح قالا أخبرنا الليث ح و حدثنيه قتيبة بن سعيد حدثنا ليث عن أبي الزبير

عن جابر قال

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

مسلم 4113صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Sharecropping of orchards
Chapter
Permissibility of selling animals for animals of the same kind with disparity
Numbering
Darussalam 4113
Muslim 4113