كتاب الحج
15  
The Book of Pilgrimage
(17)
Chapter: Clarifying the types of Ihram; and that it is permissible to perfom Hajj that is Ifrad, Tamattu and Qiran. It is permissible to join Hajj to Umrah. And when the pilgrim who is performing Qiran should exit Ihram
(17)
باب بَيَانِ وُجُوهِ الإِحْرَامِ وَأَنَّهُ يَجُوزُ إِفْرَادُ الْحَجِّ وَالتَّمَتُّعِ وَالْقِرَانِ وَجَوَازِ إِدْخَالِ الْحَجِّ عَلَى الْعُمْرَةِ وَمَتَى يَحِلُّ الْقَارِنُ مِنْ نُسُكِهِ
Sahih Muslim 1216 b

Jabir b. 'Abdullah (Allah be pleased with them) reported:

We entered with the Messenger of Allah (ﷺ) in the state of Ihram for Hajj. When we came to Mecca he commanded us to put off Ihram and make it for 'Umra. We felt it (the command) hard for us, and our hearts were anguished on account of this and it (this reaction of the people) reached the Messenger of Allah (ﷺ). We do not know whether he received (this news) from the Heaven (through revelation) or from the people. (Whatever the case might be) he said; O people, put off Ihram. If there were not the sacrificial animals with me, I would have done as you do. So we put off the Ihram (after performing Umra), and we had intercourse with our wives and did everything which a non-Muhrim does (applying perfume, putting on clothes, etc.), and when It was the day of Tarwiya (8th of Dhu'l-Hijja) we turned our back to Mecca (in order to go to Mini, 'Arafat) and we put on lhram for Hajj.
حَدَّثَنَا ابْنُ نُمَيْرٍ، حَدَّثَنِي أَبِي، حَدَّثَنَا عَبْدُ الْمَلِكِ بْنُ أَبِي سُلَيْمَانَ، عَنْ عَطَاءٍ، عَنْ جَابِرِ بْنِ عَبْدِ اللَّهِ، - رضى الله عنهما - قَالَ أَهْلَلْنَا مَعَ رَسُولِ اللَّهِ صلى الله عليه وسلم بِالْحَجِّ فَلَمَّا قَدِمْنَا مَكَّةَ أَمَرَنَا أَنْ نَحِلَّ وَنَجْعَلَهَا عُمْرَةً فَكَبُرَ ذَلِكَ عَلَيْنَا وَضَاقَتْ بِهِ صُدُورُنَا فَبَلَغَ ذَلِكَ النَّبِيَّ صلى الله عليه وسلم فَمَا نَدْرِي أَشَىْءٌ بَلَغَهُ مِنَ السَّمَاءِ أَمْ شَىْءٌ مِنْ قِبَلِ النَّاسِ فَقَالَ ‏ "‏ أَيُّهَا النَّاسُ أَحِلُّوا فَلَوْلاَ الْهَدْىُ الَّذِي مَعِي فَعَلْتُ كَمَا فَعَلْتُمْ ‏"‏ ‏.‏ قَالَ فَأَحْلَلْنَا حَتَّى وَطِئْنَا النِّسَاءَ وَفَعَلْنَا مَا يَفْعَلُ الْحَلاَلُ حَتَّى إِذَا كَانَ يَوْمُ التَّرْوِيَةِ وَجَعَلْنَا مَكَّةَ بِظَهْرٍ أَهْلَلْنَا بِالْحَجِّ ‏.‏
Reference : Sahih Muslim 1216b
In-book reference : Book 15, Hadith 153
USC-MSA web (English) reference : Book 7, Hadith 2798
  (deprecated numbering scheme)