The Prophet (ﷺ) once passed by two graves, and those two persons (in the graves) were…

Sahih al-Bukhari Book 23 Hadith 115

Sahih al-Bukhari #1361

Funerals (Al-Janaa'iz) 23:115

Narrated Ibn `Abbas:

The Prophet (ﷺ) once passed by two graves, and those two persons (in the graves) were being tortured. He said, "They are being tortured not for a great thing (to avoid). One of them never saved himself from being soiled with his urine, while the other was going about with calumnies (to make enmity between friends). He then took a green leaf of a date-palm tree split it into two pieces and fixed one on each grave. The people said, "O Allah's Messenger (ﷺ)! Why have you done so?" He replied, "I hope that their punishment may be lessened till they (the leaf) become dry."

Chapter: Placing a leaf of a date palm over the grave

Grade: Sahih