Language:
كتاب الجنائز
23  
Funerals (Al-Janaa'iz)
(79)
Chapter: If a boy becomes a Muslim and then dies, should a funeral prayer be offered for him? Should Islam be explained to a boy?
(79)
باب إِذَا أَسْلَمَ الصَّبِيُّ فَمَاتَ هَلْ يُصَلَّى عَلَيْهِ وَهَلْ يُعْرَضُ عَلَى الصَّبِيِّ الإِسْلاَمُ
Sahih al-Bukhari 1356

Narrated Anas:

A young Jewish boy used to serve the Prophet (ﷺ) and he became sick. So the Prophet (ﷺ) went to visit him. He sat near his head and asked him to embrace Islam. The boy looked at his father, who was sitting there; the latter told him to obey Abul-Qasim and the boy embraced Islam. The Prophet (ﷺ) came out saying: "Praises be to Allah Who saved the boy from the Hell-fire."

حَدَّثَنَا سُلَيْمَانُ بْنُ حَرْبٍ، حَدَّثَنَا حَمَّادٌ ـ وَهْوَ ابْنُ زَيْدٍ ـ عَنْ ثَابِتٍ، عَنْ أَنَسٍ ـ رضى الله عنه ـ قَالَ كَانَ غُلاَمٌ يَهُودِيٌّ يَخْدُمُ النَّبِيَّ صلى الله عليه وسلم فَمَرِضَ، فَأَتَاهُ النَّبِيُّ صلى الله عليه وسلم يَعُودُهُ، فَقَعَدَ عِنْدَ رَأْسِهِ فَقَالَ لَهُ ‏"‏ أَسْلِمْ ‏"‏‏.‏ فَنَظَرَ إِلَى أَبِيهِ وَهْوَ عِنْدَهُ فَقَالَ لَهُ أَطِعْ أَبَا الْقَاسِمِ صلى الله عليه وسلم‏.‏ فَأَسْلَمَ، فَخَرَجَ النَّبِيُّ صلى الله عليه وسلم وَهْوَ يَقُولُ ‏"‏ الْحَمْدُ لِلَّهِ الَّذِي أَنْقَذَهُ مِنَ النَّارِ ‏"‏‏.‏
Reference : Sahih al-Bukhari 1356
In-book reference : Book 23, Hadith 109
USC-MSA web (English) reference : Vol. 2, Book 23, Hadith 438
  (deprecated numbering scheme)