Musnad Ahmad 1131
It was narrated that ‘Ali (رضي الله عنه) said:
Khadeejah (رضي الله عنها) asked the Prophet (ﷺ) about two children of her who had died during the jahiliyyah. The Messenger of Allah (ﷺ) said: “They are in Hell.` When he saw that she was upset, he said: “If you saw where they are now, you would hate them.” She said: O Messenger of Allah (ﷺ), about my child from you? He said: `He is in Paradise.` Then the Messenger of Allah (ﷺ) said: `The believers and their children will be in Paradise and the mushrikeen and their children will be in Hell.” Then the Messenger of Allah (ﷺ) recited: “And those who believe and whose offspring follow them in Faith, - to them shall We join their offspring...” [At-Toor 52:25].
حَدَّثَنَا عَبْد اللَّهِ، حَدَّثَنِي عُثْمَانُ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا مُحَمَّدُ بْنُ فُضَيْلٍ، عَنْ مُحَمَّدِ بْنِ عُثْمَانَ، عَنْ زَاذَانَ، عَنْ عَلِيٍّ، رَضِيَ اللَّهُ عَنْهُ قَالَ سَأَلَتْ خَدِيجَةُ النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ عَنْ وَلَدَيْنِ مَاتَا لَهَا فِي الْجَاهِلِيَّةِ فَقَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ هُمَا فِي النَّارِ قَالَ فَلَمَّا رَأَى الْكَرَاهِيَةَ فِي وَجْهِهَا قَالَ لَوْ رَأَيْتِ مَكَانَهُمَا لَأَبْغَضْتِهِمَا قَالَتْ يَا رَسُولَ اللَّهِ فَوَلَدِي مِنْكَ قَالَ فِي الْجَنَّةِ قَالَ ثُمَّ قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ إِنَّ الْمُؤْمِنِينَ وَأَوْلَادَهُمْ فِي الْجَنَّةِ وَإِنَّ الْمُشْرِكِينَ وَأَوْلَادَهُمْ فِي النَّارِ ثُمَّ قَرَأَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ ‏{‏وَالَّذِينَ آمَنُوا وَاتَّبَعَتْهُمْ ذُرِّيَّتُهُمْ بِإِيمَانٍ أَلْحَقْنَا بِهِمْ ذُرِّيَّاتِهِمْ‏}‏‏.‏