Sahih Muslim Book 37, Hadith Number 6637.
Abu Huraira reported Allah’s Messenger (may peace be upon him) 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:.