Allah the Almighty declared in the Glorious Quran: And who turns away from the religion of Abraham (i.e. Islamic Monotheism) except him who befools himself? Truly. We chose him in this world and verily, in the Hereafter he will be among the righteous.
When his Lord said to him: "Submit (i.e. be a Muslim)!" He said: "I have submitted myself (as a Muslim) to the Lord of the 'Alamin (mankind, jinn and all that exists)."
And this (submission to Allah, Islam) was enjoined by Abraham upon his sons and by Jacob, (saying): "O my sons! Allah has chosen for you the (true) religion, then die not except in the Faith of Islam (as Muslims - Islamic Monotheism)."
Or were you witnesses when death approached Jacob? When he said unto his sons: "What will you worship after me?" They said: "We shall worship you Ilah (God - Allah) the Ilah (God) of your fathers, Abraham, Ishmael, Isaac, One Ilah (God), and to Him we submit (in Islam)."
That was a nation who has passed away. They shall receive the reward of what they earned and you of what you earn. And you will not be asked of what they used to do.
Related Quran Ayaaths of this Hadith.
Surah 6 : Ayah 84 Surah 4 : Ayah 163 Surah 37 : Ayah 112 Surah 37 : Ayah 113 Surah 38 : Ayah 45 Surah 21 : Ayah 72 Surah 6 : Ayah 84 Surah 4 : Ayah 163"When a person dies, his works end, except for three: ongoing charity, knowledge that is benefited from, and a righteous child who prays for him."
Prophet Mohammed (PBUH)
"The best of what a man leaves behind are three: a righteous child who supplicates for him, ongoing charity the reward of which reaches him, and knowledge that is acted upon after him."
Sunan Ibn Mājah
"Every day two angels come down from Heaven and one of them says, 'O Allah! Compensate every person who spends in Your Cause,' and the other (angel) says, 'O Allah! Destroy every miser.'"
Sahih Bukhari