This excerpt is taken from the book by Fazilat-ul-Sheikh Abdul Salam Rustami From Denial of Hadith to Denial of Quran.
Hadith 25: Relief from the torment of the grave by placing a green branch on the grave
Once the Prophet Muhammad (peace be upon him) went to a garden in Medina and heard the voices of two men who were being punished in their graves. The Prophet (peace be upon him) said: "Both of them are being punished in their graves, and this punishment is not due to any major sin. One of them was careless while urinating, and the other was a backbiter." Then the Prophet (peace be upon him) asked for a green branch, broke it into two pieces, and placed one piece on each grave. It was asked: O Messenger of Allah! Why did you do this? The Prophet (peace be upon him) replied: "It is hoped that their punishment will be lessened until these pieces dry up."
Reference: Sahih al-Bukhari, Wudu, Chapter: From the Major Sins is Not Covering One's Urine, Hadith: 216, and Hadith Location, p: 231
There are two objections by Parvez Sahib regarding this hadith: one is the denial of the punishment of the grave, and the second objection is that the green branch causes a reduction in the punishment of the grave. A detailed discussion about the punishment of the grave has already been presented. As far as the issue of reduction of punishment due to the green branch is concerned, a detailed answer is established from the Holy Quran, for example, Allah the Exalted says:
وَإِن مِّن شَيْءٍ إِلَّا يُسَبِّحُ بِحَمْدِهِ
"And there is nothing that does not glorify Him with praise."
Reference: (17-Al-Isra:44)
He also said:
يُسَبِّحُ لِلَّهِ مَا فِي السَّمَاوَاتِ وَمَا فِي الْأَرْضِ
"Whatever is in the heavens and whatever is on the earth glorifies Allah."
Reference: (62-Al-Jumu'ah:1)
And He said:
سَبَّحَ لِلَّهِ مَا فِي السَّمَاوَاتِ وَمَا فِي الْأَرْضِ
"All creatures in the heavens and the earth glorify Allah."
Reference: (61-As-Saff:1)
The above verses indicate that everything glorifies Allah Almighty, whether living or non-living, stone or tree; each glorifies according to its status. This glorification is expressed both by the language of the state and by the language of speech, and it is a divine law that wherever sincere mention of Allah and glorification and praise are made, mercy descends, the environment becomes free from sin, and where there is negligence in the glorification and praise of Allah, divine punishment descends. In the story of the garden owners, when the punishment descended upon them, the better among them said:
قَالَ أَوْسَطُهُمْ أَلَمْ أَقُل لَّكُمْ لَوْلَا تُسَبِّحُونَ ﴿٢٨﴾ قَالُوا سُبْحَانَ رَبِّنَا إِنَّا كُنَّا ظَالِمِينَ ﴿٢٩﴾
"Did I not tell you that you should glorify Him? They said, 'Our Lord is indeed pure; surely we were wrongdoers.'"
Reference: (68-Al-Qalam:28-29)
Thus, when the Prophet Muhammad (peace be upon him) perceived that these two people in the graves were being punished, he used the green branch as a means of reducing the punishment. It is also known that the Prophet (peace be upon him) does everything by the permission of Allah Almighty, and here the divine permission seems to be suspended until the branch dries. The word لعل "perhaps" is not in the sense of doubt but in the sense of certainty, as the word "la‘alla" in Allah's speech also comes with the meaning of certainty, and the Prophet (peace be upon him) said this sentence regarding Hasan (may Allah be pleased with him):
لعل الله أن يصلح به بين فئتين عظيمتين من المسلمين
"It is hoped that Allah will reconcile the two great groups of Muslims through him (Hasan, may Allah be pleased with him)."
Reference: Sahih al-Bukhari, Al-Sulh, Chapter: The Prophet's Saying about Hasan, Hadith: 2704
And this act of the Prophet Muhammad (peace be upon him) was a miracle and his special characteristic, although some scholars have considered it general.