كتاب الحيض
3
The Book of Menstruation
(21)
Chapter: At the beginning of Islam, intercourse did not necessitate ghusl unless semen was emitted, then that was abrogated and ghusl becomes obligatory for intercourse
(21)
باب إِنَّمَا الْمَاءُ مِنَ الْمَاءِ ‏
Sahih Muslim 345

Abu Sa'id al-Khudri reported:

The Messenger of Allah (ﷺ) happened to pass by (the house) of a man amongst the Ansar, and he sent for him. He came out and water was trickling down from his head. Upon this he (the Holy Prophet) said: Perhaps we put you to haste. He said: Yes. Messenger of Allah. He (the Holy Prophet) said: When you made haste or semen is not emitted, bathing is not obligatory for you, but ablution is binding. Ibn Bashshir has narrated it with a minor alteration.
حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا غُنْدَرٌ، عَنْ شُعْبَةَ، ح وَحَدَّثَنَا مُحَمَّدُ بْنُ الْمُثَنَّى، وَابْنُ، بَشَّارٍ قَالاَ حَدَّثَنَا مُحَمَّدُ بْنُ جَعْفَرٍ، حَدَّثَنَا شُعْبَةُ، عَنِ الْحَكَمِ، عَنْ ذَكْوَانَ، عَنْ أَبِي سَعِيدٍ الْخُدْرِيِّ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم مَرَّ عَلَى رَجُلٍ مِنَ الأَنْصَارِ فَأَرْسَلَ إِلَيْهِ فَخَرَجَ وَرَأْسُهُ يَقْطُرُ فَقَالَ ‏"‏ لَعَلَّنَا أَعْجَلْنَاكَ ‏"‏ ‏.‏ قَالَ نَعَمْ يَا رَسُولَ اللَّهِ ‏.‏ قَالَ ‏"‏ إِذَا أُعْجِلْتَ أَوْ أَقْحَطْتَ فَلاَ غُسْلَ عَلَيْكَ وَعَلَيْكَ الْوُضُوءُ ‏"‏ ‏.‏ وَقَالَ ابْنُ بَشَّارٍ ‏"‏ إِذَا أُعْجِلْتَ أَوْ أُقْحِطْتَ ‏"‏ ‏.‏
Reference : Sahih Muslim 345
In-book reference : Book 3, Hadith 100
USC-MSA web (English) reference : Book 3, Hadith 676
  (deprecated numbering scheme)