The Messenger of Allah ﷺ said, "Do not insult the dead, for you will hurt the living."
قال رسول الله ﷺ: لا تسبوا الأموات، فتؤذوا الأحياء.
Tirmidhi (1982) narrated it from Mahmud bin Ghaylan, who said, Abu Dawud Hafari narrated to us, from Sufyan, from Ziyad bin Alaqa, who said, I heard Mughira bin Shuba mention it. Ibn Hibban (3022) graded it sahih, narrating it through the route of Abu Dawud Hafari. The hadith is also found in Musnad Imam Ahmad (18209) from Abu Naeem, who said, Sufyan narrated to us, with his chain of transmission, in similar wording.Tirmidhi said, "The companions of Sufyan differed regarding this hadith. Some of them narrated it like the narration of Hafari, while others narrated from Sufyan, from Ziyad bin Alaqa, who said, I heard a man narrating from Mughira bin Shuba, from the Prophet ﷺ, something similar."I say, among those who did so was Abdul-Rahman, who said, Sufyan narrated to us, from Ziyad bin Alaqa, who said, I heard a man in the presence of Mughira bin Shuba say, the Messenger of Allah ﷺ said, "Do not curse the dead, for that causes distress to the living." Ahmad narrated it (18210) from Abdul-Rahman, that is, Ibn Mahdi, with his chain of transmission. This unnamed man is Zayd bin Arqam, as will appear in the hadith that follows.