There is no contradiction between the Quranic verses and hadiths that speak about the punishment and blessings in the grave. It has been told in these texts that everyone who is placed in the grave has to face it, and they can seek help from Allah SWT only. As the Holy Prophet (PBUH) instructed us to seek refuge from the punishment of the grave.
“O, Allah! I seek refuge with You from helplessness, laziness, cowardice and feeble old age; I seek refuge with You from afflictions of life and death and seek refuge with You from the punishment in the grave.” – Sahih al-Bukhari Book 52 Hadith 77
The punishment in the grave is the result of the sins committed by the person in his/her life. Thus, we must learn about the sins with which the punishment comes. Here are a few sins which we should avoid.
Shirk – associating someone else with Allah, can cause the punishment in the grave.
And who is more unjust than one who invents a lie about Allah or says, “It has been inspired to me,” while nothing has been inspired to him, and one who says, “I will reveal [something] like what Allah revealed.” And if you could but see when the wrongdoers are in the overwhelming pangs of death while the angels extend their hands, [saying], “Discharge your souls! Today you will be awarded the punishment of [extreme] humiliation for what you used to say against Allah other than the truth and [that] you were, toward His verses, being arrogant.” – Surah Inaam, verse 93
According to several Quranic verses and hadiths, the hypocrites will be sent to the lowest level of the Hell. No wonder why Allah has warned us before.
And among those around you of the Bedouins are hypocrites, and [also] from the people of Madinah. They have become accustomed to hypocrisy. You, [O Muhammad], do not know them, [but] We know them. We will punish them twice [in this world]; then they will be returned to a great punishment. – Surah Tauba, verse 101
We usually consider backbiting as a routine gossip or a chitchat, but how many of us really think before seeding enmity between the two?
Once the Prophet, while passing through one of the grave-yards of Medina or Mecca heard the voices of two persons who were being tortured in their graves. The Prophet said, “These two persons are being tortured not for a major sin (to avoid).” The Prophet then added, “Yes! (they are being tortured for a major sin). Indeed, one of them never saved himself from being soiled with his urine while the other used to go about with calumnies (to make enmity between friends) – Sahih al-Bukhari Book 4 Hadith 215
4. Missing An Obligatory Prayer
On the night journey (Shabe Mairaj) of the Holy Prophet (PBUH), two angels showed him different people who were being tormented in different ways. The ones who missed there daily prayers were punished by smashing a rock on their head.
I said to them, ‘I have seen many wonders tonight. What does all that mean which I have seen?’ They replied, ‘We will inform you: As for the first man you came upon, whose head was being smashed with the rock, he is the symbol of the one who studies the Qur’an and then neither recites it nor acts on its orders, and sleeps, neglecting the enjoined prayers. – Riyad Us Saliheen Book 18 Hadith 36
Holy Prophet (PBUH) saw the punishment of the people who were used to lie.
As for the man you came upon, whose sides of mouth, nostrils, and eyes were torn off from front to back, he is the symbol of the man who goes out of his house in the morning and tells lies that are spread all over the world. Riyad Us Saliheen Book 18 Hadith 36
The two angels showed Hazrat Muhammad (PBUH) the punishment who committed zina.
And those naked men and women whom you saw in a construction resembling an oven, they are the adulterers and the adulteresses – Riyad Us Saliheen Book 18 Hadith 36
May Allah prevent us from the sins and guide us to the straight path, Ameen.