The Messenger of Allah ﷺ had a slave woman with whom he had relations. Ayesha and Hafsa kept pressing him about her until he forbade her to himself, so Allah revealed, "Prophet, why do you forbid what Allah has made lawful for you?" [Tahrim 66:1].
أن رسول الله ﷺ كانت له أمة يطأها، فلم تزل به عائشة وحفصة حتى حرمها على نفسه، فأنزل الله عز وجل: {يأيها النبي لم تحرم ما أحل الله لك}
Nasai (3959) narrated it from Ibrahim bin Yunus bin Muhammad Harami, that being his nickname, who said, my father narrated to us, Hammad bin Salama narrated to us, from Thabit, from Anas, and he related it. Its chain of transmission is sahih, and the slave woman is Mariyah the Copt, the mother of Ibrahim.