The Messenger of Allah ﷺ said, "Whoever has a slave-girl whom he educates with excellent manners, teaches her with excellent teaching, then frees her and marries her, he will have two rewards. And any man from the People of the Book who believed in his prophet and then believed in Muhammad will have two rewards. And any owned slave who fulfills his duty to Allah and his duty to his masters will have two rewards."Salih said, Shaybi said, "I have given this to you for nothing, though a rider would ride to Medina for less than this."
حدثنا عبد الله بن سعيد أبو سعيد الأشج حدثنا عبدة بن سليمان عن صالح بن صالح بن حي عن الشعبي عن أبي بردة
قال رسول الله ﷺ من كانت له جارية فأدبها فأحسن أدبها وعلمها فأحسن تعليمها ثم أعتقها وتزوجها فله أجران وأيما رجل من أهل الكتاب آمن بنبيه وآمن بمحمد فله أجران وأيما عبد مملوك أدى حق الله عليه وحق مواليه فله أجران قال صالح قال الشعبي قد أعطيتكها بغير شيء إن كان الراكب ليركب فيما دونها إلى المدينة
Bukhari narrated it, Knowledge, chapter on a man teaching his slave and his family, no. 97, and others, and Muslim, Faith, chapter on the obligation of believing in the mission of our Prophet Muhammad ﷺ to all people and the abrogation of other religions by his religion, 154, from the hadith of Salih, in full.