كتاب القدر
46  
The Book of Destiny
(6)
Chapter: The Meaning Of "Every Child Is Born In A State Of Fitrah" And The Ruling On The Dead Children Of The Disbelievers And Of The Muslims.
(6)
بَاب مَعْنَى كُلِّ مَوْلُودٍ يُولَدُ عَلَى الْفِطْرَةِ وَحُكْمِ مَوْتِ أَطْفَالِ الْكُفَّارِ وَأَطْفَالِ الْمُسْلِمِينَ
Sahih Muslim 2662 c

'A'isha, the mother of the believers, said that Allah's Messenger (ﷺ) was called to lead the funeral prayer of a child of the Ansar. I said:

Allah's Messenger, there is happiness for this child who is a bird from the birds of Paradise for it committed no sin nor has he reached the age when one can commit sin. He said: 'A'isha, per adventure, it may be otherwise, because God created for Paradise those who are fit for it while they were yet in their father's loins and created for Hell those who are to go to Hell. He created them for Hell while they were yet in their father's loins.
حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا وَكِيعٌ، عَنْ طَلْحَةَ بْنِ يَحْيَى، عَنْ عَمَّتِهِ، عَائِشَةَ بِنْتِ طَلْحَةَ عَنْ عَائِشَةَ أُمِّ الْمُؤْمِنِينَ، قَالَتْ دُعِيَ رَسُولُ اللَّهِ صلى الله عليه وسلم إِلَى جَنَازَةِ صَبِيٍّ مِنَ الأَنْصَارِ فَقُلْتُ يَا رَسُولَ اللَّهِ طُوبَى لِهَذَا عُصْفُورٌ مِنْ عَصَافِيرِ الْجَنَّةِ لَمْ يَعْمَلِ السُّوءَ وَلَمْ يُدْرِكْهُ قَالَ ‏ "‏ أَوَغَيْرَ ذَلِكَ يَا عَائِشَةُ إِنَّ اللَّهَ خَلَقَ لِلْجَنَّةِ أَهْلاً خَلَقَهُمْ لَهَا وَهُمْ فِي أَصْلاَبِ آبَائِهِمْ وَخَلَقَ لِلنَّارِ أَهْلاً خَلَقَهُمْ لَهَا وَهُمْ فِي أَصْلاَبِ آبَائِهِمْ ‏"‏ ‏.‏
Reference : Sahih Muslim 2662c
In-book reference : Book 46, Hadith 47
USC-MSA web (English) reference : Book 33, Hadith 6436
  (deprecated numbering scheme)