In a Nutshell:
Muslims can avoid the punishment of the grave (azaab al-qabar) through rituals and good deeds. There are a number of ahadith mention specific acts that help in this regarding supplicating against azaab al-qabar, reading Surat al-Mulk, involving oneself in jihad for Allah's sake and performing mandatory rituals, following them with voluntary ones.
Background
The punishment and reward of the grave are the consequence of our deeds. Muslims are generally required to be as righteous as possible. Under this category, each good deed is valid to avoid the punishment and acquire the reward, such as reciting the Qur'an, leaning the Shari'ah, voluntary fasting, voluntary prayers, mentioning the Glory of Allah, invoking salah on the Prophet (saw), and many other rituals. Allah says:
إِنَّ الذينَ قَالُوا رَبُّنَا اللهُ ثُمّ اسْتَقَامُوا فَلا خَوْفٌ عَلَيْهِمْ وَلاَ هُمْ يَحْزَنُونَ
"Indeed, those who have said, 'Our Lord is Allah,' and then remained on a right course - there will be no fear concerning them, nor will they grieve." (Qur'an 46:13)
Whilst general good deeds are valid, there are a number of narrations for specific deeds Muslims should perform to avoid the punishment of the grave (azaab al-qabar).
Specific Rituals
1. Seek refuge with Allah against azaab al-qabar: The Prophet (saw) used to teach the companions (ra) the following supplication especially after the tashahud (before the end of the prayer):
للَّهُمَّ إِنِّي أَعُوذُ بِكَ مِنْ فِتْنَةِ النَّارِ وَمِنْ عَذَابِ النَّارِ، وَأَعُوذُ بِكَ مِنْ فِتْنَةِ الْقَبْرِ، وَأَعُوذُ بِكَ مِنْ عَذَابِ الْقَبْرِ، وَأَعُوذُ بِكَ مِنْ فِتْنَةِ الْغِنَى، وَأَعُوذُ بِكَ مِنْ فِتْنَةِ الْفَقْرِ، وَأَعُوذُ بِكَ مِنْ فِتْنَةِ الْمَسِيحِ الدَّجَّالِ.
"O Allah! I seek refuge with You from the affliction of the Fire and from the punishment in the Fire, and seek refuge with You from the affliction of the grave, and I seek refuge with You from the affliction of wealth, and I seek refuge with You from the affliction of poverty, and seek refuge with You from the affliction of Al-Masih Ad-Dajjal." (Sahih al-Bukhari 6376)
2. Reading Surat al-Mulk (Sura No. 67) protects from azaab al-qabar. The Prophet (saw) recommended reading it frequently and said:
هِيَ الْمَانِعَةُ هِيَ الْمُنْجِيَةُ تُنْجِيهِ مِنْ عَذَابِ الْقَبْرِ
"It is the defender; it is the deliverer - it delivers from the punishment of the grave." (Jami at-Tirmidhi, Hadith 3133)
سُورَةٌ مِنَ الْقُرْآنِ ثَلاَثُونَ آيَةً تَشْفَعُ لِصَاحِبِهَا حَتَّى يُغْفَرَ لَهُ: تَبَارَكَ الَّذِي بِيَدِهِ الْمُلْكُ
"A surah of the Qur'an containing thirty verses will intercede its reader till he will be forgiven. That is: "Blessed is He in Whose Hand is the sovereignty" (Surah 67). (Sunan Abi Dawud 1400)
3. The Jihad for Allah's sake. The Prophet (saw) said:
رِبَاطُ يَوْمٍ وَلَيْلَةٍ خَيْرٌ مِنْ صِيَامِ شَهْرٍ وَقِيَامِهِ وَإِنْ مَاتَ جَرَى عَلَيْهِ عَمَلُهُ الَّذِي كَانَ يَعْمَلُهُ وَأُجْرِيَ عَلَيْهِ رِزْقُهُ وَأَمِنَ الْفَتَّانَ
"Keeping watch for a day and a night is better (in point of reward) than fasting for a whole month and standing in prayer every night. If a person dies (while performing this duty), his (meritorious) activity will continue and he will go on receiving his reward for it perpetually and will be saved from the torture of the grave." (Sahih Muslim 1913 a)
4. Undertaking mandatory rituals and following them with voluntary ones, protect and defend during the questioning in the grave: The Prophet (saw) said:
إِنَّ الْمَيِّتَ إِذَا وُضِعَ فِي قَبْرِهِ إِنَّهُ يَسْمَعُ خَفْقَ نِعَالِهِمْ حِينَ يُوَلُّونَ عَنْهُ، فَإِنْ كَانَ مُؤْمِنًا، كَانَتِ الصَّلَاةُ عِنْدَ رَأْسِهِ، وَكَانَ الصِّيَامُ عَنْ يَمِينِهِ، وَكَانَتِ الزَّكَاةُ عَنْ شِمَالِهِ، وَكَانَ فِعْلُ الْخَيْرَاتِ مِنَ الصَّدَقَةِ وَالصِّلَةِ وَالْمَعْرُوفِ وَالْإِحْسَانِ إِلَى النَّاسِ عِنْدَ رِجْلَيْهِ.
"When the dead person is put in the grave, he hears the sound of your shoes when you depart and leave him. If he is a believer, the prayer will stand by his head, zakah to his right and the fast by his left; the righteous deeds, such as charity, keeping relations with kith and kin and acts of kindness to people will stand by his feet." (Sahih ibn Hiban, Vol. 4, p. 45)
Conclusion
Muslims should perform as many righteous deeds as possible to protect themselves (after Allah's Mercy) from azaab al-qabar. There are a number of ahadith that state certain acts help; invoking the supplication that protects against azaab al-qabar, reading Surat al-Mulk, partaking in jihad for Allah and performing the mandatory and voluntary rituals.
<<Show less