كتاب النكاح
16  
The Book of Marriage
(22)
Chapter: The ruling on coitus interrupts ('Azl)
(22)
باب حُكْمِ الْعَزْلِ ‏
Sahih Muslim 1439 a

Jabir (Allah be pleased with him) reported that a man came to Allah's Messenger (ﷺ) and said:

I have a slave-girl who is our servant and she carries water for us and I have intercourse with her, but I do not want her to conceive. He said: Practise 'azl, if you so like, but what is decreed for her will come to her. The person stayed back (for some time) and then came and said: The girl has become pregnant, whereupon he said: I told you what was decreed for her would come to her.
حَدَّثَنَا أَحْمَدُ بْنُ عَبْدِ اللَّهِ بْنِ يُونُسَ، حَدَّثَنَا زُهَيْرٌ، أَخْبَرَنَا أَبُو الزُّبَيْرِ، عَنْ جَابِرٍ، أَنَّ رَجُلاً، أَتَى رَسُولَ اللَّهِ صلى الله عليه وسلم فَقَالَ إِنَّ لِي جَارِيَةً هِيَ خَادِمُنَا وَسَانِيَتُنَا وَأَنَا أَطُوفُ عَلَيْهَا وَأَنَا أَكْرَهُ أَنْ تَحْمِلَ ‏.‏ فَقَالَ ‏"‏ اعْزِلْ عَنْهَا إِنْ شِئْتَ فَإِنَّهُ سَيَأْتِيهَا مَا قُدِّرَ لَهَا ‏"‏ ‏.‏ فَلَبِثَ الرَّجُلُ ثُمَّ أَتَاهُ فَقَالَ إِنَّ الْجَارِيَةَ قَدْ حَبِلَتْ ‏.‏ فَقَالَ ‏"‏ قَدْ أَخْبَرْتُكَ أَنَّهُ سَيَأْتِيهَا مَا قُدِّرَ لَهَا ‏"‏ ‏.‏
Reference : Sahih Muslim 1439a
In-book reference : Book 16, Hadith 158
USC-MSA web (English) reference : Book 8, Hadith 3383
  (deprecated numbering scheme)