كتاب التوبة
50  
The Book of Repentance
(4)
Chapter: The Vastaess Of Allah's Mercy, Which Prevails Over His Wrath
(4)
باب فِي سَعَةِ رَحْمَةِ اللَّهِ تَعَالَى وَأَنَّهَا سَبَقَتْ غَضَبَهُ ‏‏
Sahih Muslim 2756 a

Abu Huraira reported Allah's Messenger (ﷺ) as saying that a person who had never done any good deed asked the members of his family to burn his dead body when he would die and to scatter half of its ashes over the land and half in the ocean. By Allah, if Allah finds him in His grip, He would torment him with a torment with which He did not afflict anyone amongst the people of the world; and when the person died, it was done to him as he had commanded (his family) to do. Allah commanded the land to collect (the ashes scattered on it) and He commanded the ocean and that collected (ashes) contained in it. Allah questioned him why he had done. that He said:

My Lord, it is out of Thine fear that I have done it and Thou art well aware of it, and Allah granted him pardon:.
حَدَّثَنِي مُحَمَّدُ بْنُ مَرْزُوقِ ابْنِ بِنْتِ مَهْدِيِّ بْنِ مَيْمُونٍ، حَدَّثَنَا رَوْحٌ، حَدَّثَنَا مَالِكٌ، عَنْ أَبِي الزِّنَادِ، عَنِ الأَعْرَجِ، عَنْ أَبِي هُرَيْرَةَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ ‏ "‏ قَالَ رَجُلٌ لَمْ يَعْمَلْ حَسَنَةً قَطُّ لأَهْلِهِ إِذَا مَاتَ فَحَرِّقُوهُ ثُمَّ اذْرُوا نِصْفَهُ فِي الْبَرِّ وَنِصْفَهُ فِي الْبَحْرِ فَوَاللَّهِ لَئِنْ قَدَرَ اللَّهُ عَلَيْهِ لَيُعَذِّبَنَّهُ عَذَابًا لاَ يُعَذِّبُهُ أَحَدًا مِنَ الْعَالَمِينَ فَلَمَّا مَاتَ الرَّجُلُ فَعَلُوا مَا أَمَرَهُمْ فَأَمَرَ اللَّهُ الْبَرَّ فَجَمَعَ مَا فِيهِ وَأَمَرَ الْبَحْرَ فَجَمَعَ مَا فِيهِ ثُمَّ قَالَ لِمَ فَعَلْتَ هَذَا قَالَ مِنْ خَشْيَتِكَ يَا رَبِّ وَأَنْتَ أَعْلَمُ ‏.‏ فَغَفَرَ اللَّهُ لَهُ ‏"‏ ‏.‏
Reference : Sahih Muslim 2756a
In-book reference : Book 50, Hadith 28
USC-MSA web (English) reference : Book 37, Hadith 6637
  (deprecated numbering scheme)