Sunan Ibn Majah, Volume 5, Book 37, Hadith 4262 (DarusSalam)

It was narrated from Abu Hurairah that the Prophet said: “Angels come to the dying person, and if the man was righteous, they say: ‘Come out, O good soul that was in a good body, come out praiseworthy and receive glad tidings of mercy and fragrance and a Lord Who is not angry.’ And this is repeated until it comes out, then it is taken up to heaven, and it is opened for it, and it is asked: ‘Who is this?’ They say: ‘So-and-so.’ It is said: ‘Welcome to the good soul that was in a good body. Enter praiseworthy and receive the glad tidings of mercy and fragrance and a Lord Who is not angry.’ And this is repeated until it is brought to the heaven above which is Allah. But if the man was evil, they say: ‘Come out O evil soul that was in an evil body. Come out blameworthy, and receive the tidings of boiling water and the discharge of dirty wounds,’ and other torments of similar kind, all together. And this is repeated until it comes out, then it is taken up to heaven and it is not opened for it. And it is asked: ‘Who is this?’ It is said: ‘So-and-so.’ And it is said: ‘No welcome to the evil soul that was in an evil body. Go back blameworthy, for the gates of heaven will not be opened to you.’ So it is sent back down from heaven, then it goes to the grave.”

حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا شَبَابَةُ، عَنِ ابْنِ أَبِي ذِئْبٍ، عَنْ مُحَمَّدِ بْنِ عَمْرِو بْنِ عَطَاءٍ، عَنْ سَعِيدِ بْنِ يَسَارٍ، عَنْ أَبِي هُرَيْرَةَ، عَنِ النَّبِيِّ ـ صلى الله عليه وسلم ـ قَالَ ‏:‏ ‏ "‏ الْمَيِّتُ تَحْضُرُهُ الْمَلاَئِكَةُ فَإِذَا كَانَ الرَّجُلُ صَالِحًا قَالُوا ‏:‏ اخْرُجِي أَيَّتُهَا النَّفْسُ الطَّيِّبَةُ كَانَتْ فِي الْجَسَدِ الطَّيِّبِ اخْرُجِي حَمِيدَةً وَأَبْشِرِي بِرَوْحٍ وَرَيْحَانٍ وَرَبٍّ غَيْرِ غَضْبَانَ فَلاَ يَزَالُ يُقَالُ لَهَا ذَلِكَ حَتَّى تَخْرُجَ ثُمَّ يُعْرَجُ بِهَا إِلَى السَّمَاءِ فَيُفْتَحُ لَهَا فَيُقَالُ ‏:‏ مَنْ هَذَا فَيَقُولُونَ ‏:‏ فُلاَنٌ ‏.‏ فَيُقَالُ ‏:‏ مَرْحَبًا بِالنَّفْسِ الطَّيِّبَةِ، كَانَتْ فِي الْجَسَدِ الطَّيِّبِ ادْخُلِي حَمِيدَةً، وَأَبْشِرِي بِرَوْحٍ وَرَيْحَانٍ وَرَبٍّ غَيْرِ غَضْبَانَ ‏.‏ فَلاَ يَزَالُ يُقَالُ لَهَا ذَلِكَ حَتَّى يُنْتَهَى بِهَا إِلَى السَّمَاءِ الَّتِي فِيهَا اللَّهُ عَزَّ وَجَلَّ وَإِذَا كَانَ الرَّجُلُ السُّوءُ قَالَ اخْرُجِي أَيَّتُهَا النَّفْسُ الْخَبِيثَةُ كَانَتْ فِي الْجَسَدِ الْخَبِيثِ اخْرُجِي ذَمِيمَةً وَأَبْشِرِي بِحَمِيمٍ وَغَسَّاقٍ ‏.‏ وَآخَرَ مِنْ شَكْلِهِ أَزْوَاجٌ ‏.‏ فَلاَ يَزَالُ يُقَالُ لَهَا ذَلِكَ حَتَّى تَخْرُجَ ثُمَّ يُعْرَجُ بِهَا إِلَى السَّمَاءِ فَلاَ يُفْتَحُ لَهَا فَيُقَالُ ‏:‏ مَنْ هَذَا فَيُقَالُ ‏:‏ فُلاَنٌ ‏.‏ فَيُقَالُ ‏:‏ لاَ مَرْحَبًا بِالنَّفْسِ الْخَبِيثَةِ كَانَتْ فِي الْجَسَدِ الْخَبِيثِ ارْجِعِي ذَمِيمَةً فَإِنَّهَا لاَ تُفْتَحُ لَكِ أَبْوَابُ السَّمَاءِ فَيُرْسَلُ بِهَا مِنَ السَّمَاءِ ثُمَّ تَصِيرُ إِلَى الْقَبْرِ ‏" ‏ ‏.‏ ثُمَّ ذَكَرَ الyù

sunnah.com