Abu Hurairah reported,

The Prophet ﷺ said, "There was a man who used to wrong himself greatly. When death came to him, he said to his sons, 'When I die, burn me, then grind my remains, then scatter me in the wind. By Allah, if my Lord gets hold of me, He will punish me with a punishment He has never inflicted on anyone.'When he died, they did just that. So Allah commanded the earth, saying, 'Gather what you have of him.' It did so, and there he stood.Allah asked, 'What drove you to do what you did?'He answered, 'My Lord, fear of You.'So Allah forgave him."Another narrator said, "Dread of You, my Lord."

Bukhari 3481

Sahih

حدثني عبد الله بن محمد حدثنا هشام أخبرنا معمر عن الزهري عن حميد بن عبد الرحمن

عن أبي هريرة رضي الله عنه

عن النبي ﷺ قال كان رجل يسرف على نفسه فلما حضره الموت قال لبنيه إذا أنا مت فأحرقوني ثم اطحنوني ثم ذروني في الريح فوالله لئن قدر علي ربي ليعذبني عذابا ما عذبه أحدا فلما مات فعل به ذلك فأمر الله الأرض فقال اجمعي ما فيك منه ففعلت فإذا هو قائم فقال ما حملك على ما صنعت قال يا رب خشيتك فغفر له وقال غيره مخافتك يا رب

البخاري 3481صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Hadiths of the prophets
Chapter
Hadith of the cave
Numbering
Darussalam 3481
Bukhari 3481