Ayesha reported,

Barirah came to me and said, "Ayesha, I have made an agreement with my owners to buy my freedom for nine awqiyahs, one awqiyah each year. Help me."She had not yet paid anything toward her contract. Ayesha, feeling sympathy for her, said, "Go back to your owners. If they agree that I pay them the entire amount and that your loyalty be to me, I will do so."Barirah went to her owners and presented this to them, but they refused and said, "If she wants to do that for you as a good deed, let her, but the right of loyalty will remain with us."Ayesha mentioned this to the Messenger of Allah ﷺ, and he said, "Do not let that stop you from taking her. Buy her and free her, for the right of loyalty belongs to the one who frees the slave."So she did. Then the Messenger of Allah ﷺ stood before the people, praised Allah the Exalted, and said, "Now then, what is the matter with people who stipulate conditions that are not in the Book of Allah? Whoever stipulates a condition that is not in the Book of Allah, it is invalid, even if he stipulates a hundred such conditions. The judgment of Allah is more deserving and the condition of Allah is more binding. The right of loyalty belongs only to the one who frees the slave."

Nasai 4660

Sahih

أخبرنا يونس بن عبد الأعلى قال أنبأنا ابن وهب قال أخبرني رجال من أهل العلم منهم يونس والليث أن ابن شهاب أخبرهم عن عروة

عن عائشة أنها قالت

جاءت بريرة إلي فقالت يا عائشة إني كاتبت أهلي على تسع أواق في كل عام أوقية فأعينيني ولم تكن قضت من كتابتها شيئا فقالت لها عائشة ونفست فيها ارجعي إلى أهلك فإن أحبوا أن أعطيهم ذلك جميعا ويكون ولاؤك لي فعلت فذهبت بريرة إلى أهلها فعرضت ذلك عليهم فأبوا وقالوا إن شاءت أن تحتسب عليك فلتفعل ويكون ذلك لنا فذكرت ذلك عائشة لرسول الله ﷺ فقال لا يمنعك ذلك منها ابتاعي وأعتقي فإن الولاء لمن أعتق ففعلت وقام رسول الله ﷺ في الناس فحمد الله تعالى ثم قال أما بعد فما بال الناس يشترطون شروطا ليست في كتاب الله من اشترط شرطا ليس في كتاب الله فهو باطل وإن كان مائة شرط قضاء الله أحق وشرط الله أوثق وإنما الولاء لمن أعتق

النسائي 4660صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Sales
Chapter
Mukatab who is sold before paying off any of his contract
Numbering
Darussalam 4660
Nasai 4660