Anas bin Malik reported,

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].

Azami 13584

Sahih

عن أنس

أن رسول الله ﷺ كانت له أمة يطأها، فلم تزل به عائشة وحفصة حتى حرمها على نفسه، فأنزل الله عز وجل: {يأيها النبي لم تحرم ما أحل الله لك}

الأعظمي 13584صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Tafsir of the great Quran
Chapter
Tafsir of Surah Tahrim
Section
His saying, "O Prophet, why do you prohibit what Allah has made lawful for you, seeking the approval of your wives? And Allah is Forgiving and Merciful. Allah has already ordained for you the dissolution of your oaths. And Allah is your protector, and He is the Aleem, the Wise. And when the Prophet confided to one of his wives a statement, and when she informed another of it and Allah disclosed it to him, he made known part of it and avoided part. And when he informed her about it, she said, 'Who told you this?' He said, 'The Aleem informed me.'"
Numbering
Jami al-Kamil 13584 (2nd edition)
Azami 13584