كتاب الحيض
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 346 b

Ubayy ibn Ka'b narrated it from the Messenger of Allah (ﷺ) that he said:

If a person has sexual intercourse with his wife, but does not experience orgasm, he should wash his organ and perform an ablution.
وَحَدَّثَنَا مُحَمَّدُ بْنُ الْمُثَنَّى، حَدَّثَنَا مُحَمَّدُ بْنُ جَعْفَرٍ، حَدَّثَنَا شُعْبَةُ، عَنْ هِشَامِ بْنِ عُرْوَةَ، حَدَّثَنِي أَبِي، عَنِ الْمَلِيِّ، عَنِ الْمَلِيِّ، - يَعْنِي بِقَوْلِهِ الْمَلِيِّ عَنِ الْمَلِيِّ أَبُو أَيُّوبَ، - عَنْ أُبَىِّ بْنِ كَعْبٍ، عَنْ رَسُولِ اللَّهِ صلى الله عليه وسلم أَنَّهُ قَالَ فِي الرَّجُلِ يَأْتِي أَهْلَهُ ثُمَّ لاَ يُنْزِلُ قَالَ ‏ "‏ يَغْسِلُ ذَكَرَهُ وَيَتَوَضَّأُ ‏"‏ ‏.‏
Reference : Sahih Muslim 346 b
In-book reference : Book 3, Hadith 102
USC-MSA web (English) reference : Book 3, Hadith 678
  (deprecated numbering scheme)