Anas bin Malik reported,

The Prophet ﷺ passed by a walled garden belonging to Banu Najjar and heard a voice coming from a grave. He asked, "When did the occupant of this grave die?"They replied, "He died during the days of ignorance."He said, "Were it not that you would cease to bury your dead, I would have prayed to Allah to make you hear the punishment of the grave."

Ahmad 12123

Sahih

حدثنا يحيى بن سعيد عن حميد أخبرنا

أنس بن مالك قال

مر النبي ﷺ بحائط لبني النجار فسمع صوتا من قبر فقال متى مات صاحب هذا القبر قالوا مات في الجاهلية فقال لولا أن لا تدافنوا لدعوت الله أن يسمعكم عذاب القبر

أحمد 12123صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Anas bin Malik
Numbering
Darussalam 12123
Ahmad 12123