كتاب النكاح
16  
The Book of Marriage
(3)
Chapter: Mut'ah Marriage: It was permitted then abrograted, then permitted then abrogated, and it will remain Forbidden until the day of resurrection
(3)
باب نِكَاحِ الْمُتْعَةِ وَبَيَانِ أَنَّهُ أُبِيحَ ثُمَّ نُسِخَ ثُمَّ أُبِيحَ ثُمَّ نُسِخَ وَاسْتَقَرَّ تَحْرِيمُهُ إِلَى يَوْمِ الْقِيَامَةِ
Sahih Muslim 1406 d

Sabra al-Juhani reported on the authority of his father that while he was with Allah's Messenger (ﷺ) he said:

O people, I had permitted you to contract temporary marriage with women, but Allah has forbidden it (now) until the Day of Resurrection. So he who has any (woman with this type of marriage contract) he should let her off, and do not take back anything you have given to them (as dower).
حَدَّثَنَا مُحَمَّدُ بْنُ عَبْدِ اللَّهِ بْنِ نُمَيْرٍ، حَدَّثَنَا أَبِي، حَدَّثَنَا عَبْدُ الْعَزِيزِ بْنُ عُمَرَ، حَدَّثَنِي الرَّبِيعُ بْنُ سَبْرَةَ الْجُهَنِيُّ، أَنَّ أَبَاهُ، حَدَّثَهُ أَنَّهُ، كَانَ مَعَ رَسُولِ اللَّهِ صلى الله عليه وسلم فَقَالَ ‏ "‏ يَا أَيُّهَا النَّاسُ إِنِّي قَدْ كُنْتُ أَذِنْتُ لَكُمْ فِي الاِسْتِمْتَاعِ مِنَ النِّسَاءِ وَإِنَّ اللَّهَ قَدْ حَرَّمَ ذَلِكَ إِلَى يَوْمِ الْقِيَامَةِ فَمَنْ كَانَ عِنْدَهُ مِنْهُنَّ شَىْءٌ فَلْيُخَلِّ سَبِيلَهُ وَلاَ تَأْخُذُوا مِمَّا آتَيْتُمُوهُنَّ شَيْئًا‏"‏ ‏.‏
Reference : Sahih Muslim 1406d
In-book reference : Book 16, Hadith 25
USC-MSA web (English) reference : Book 8, Hadith 3255
  (deprecated numbering scheme)