The Prophet ﷺ said, "A man wronged his own soul through excessive sin. When death drew near, he instructed his sons, 'When I die, burn my body, then grind my remains to powder, then scatter the dust on the wind into the sea. By Allah, if my Lord ever gets hold of me, He will punish me with a punishment He has inflicted on no one else.'So they did that to him.Then Allah said to the earth, 'Return what you have taken,' and there he was, standing.Allah asked him, 'What drove you to do what you did?'He answered, 'Fear of You, my Lord,' or he said, 'Dread of You.'So Allah forgave him for that."
عن النبي ﷺ قال: أسرف رجل على نفسه، فلما حضره الموت أوصى بنيه فقال: إذا أنا مت فأحرقوني، ثم اسحقوني، ثم ذروني في الريح في البحر، فوالله لئن قدر علي ربي ليعذبني عذابا ما عذبه به أحدا، قال: ففعلوا ذلك به، فقال للأرض: أدي ما أخذت، فإذا هو قائم، فقال له: ما حملك على ما صنعت؟ فقال: خشيتك يا رب، أو قال: مخافتك فغفر له بذلك.
Bukhari narrated it in the Chapters on the Prophets (3481), and Muslim narrated it in the Book of Repentance (2756-25), both through the route of Mamar, who said, Zuhri said to me, "Shall I not narrate to you two remarkable hadiths?" Zuhri said, Humayd bin Abdul-Rahman informed me, from Abu Hurairah, and he related it.Bukhari also narrated it in the Book of Tawhid (7506), and Muslim in the Book of Repentance (2756-24), both through the route of Malik (Book of Funerals, 52), from Abu Zinad, from Araj, from Abu Hurairah, that the Messenger of Allah ﷺ said, "A man who had never done a single good deed said to his family, 'When I die, burn me, then scatter half of my ashes on land and half in the sea. For by Allah, if Allah has power over him...'" the hadith continuing in a manner similar to the narration of Humayd bin Abdul-Rahman from Abu Hurairah.