The Messenger of Allah ﷺ said, "Do not insult the dead, for they have already reached what they sent forth."
أخبرنا حميد بن مسعدة عن بشر وهو ابن المفضل عن شعبة عن سليمان الأعمش عن مجاهد
قال رسول الله ﷺ لا تسبوا الأموات فإنهم قد أفضوا إلى ما قدموا
Bukhari narrated it in the Book of Funerals, chapter on what is forbidden regarding cursing the dead, hadith no. 1393, from the hadith of Shubah, and it is also found in Al-Kubra, hadith no. 2063.