Hadithcore
Riyad as-Salihin, 672

Abu Bakrah (May Allah be pleased with him) reported:

I heard Messenger of Allah (ﷺ) saying, "He who insults the rulers Allah will insult him." <b>[At-Tirmidhi, who classified it as Hadith Hasan]</b>.

وعن أبى بكرة رضي الله عنه قال‏:‏ سمعت رسول الله صلى الله عليه وسلم يقول‏:‏ “من أهان السلطان أهانه الله” ‏(‏‏(‏رواه الترمذي وقال‏:‏ حديث حسن‏)‏‏)‏‏.‏ وفي الباب أحاديث كثيرة في الصحيح ، وقد سبق بعضها في أبواب‏.‏

References1 variant
In-Book Reference
Introduction, Hadith 672
Sharh · explanationclick to expand
<b>Guidance from the Hadith:</b><br> 1) If a person insults the Muslim ruler by defaming him and announces his flaws among the people, he will be subject to insult from Allah Almighty; a punishment similar to what he committed.<br> 2) Insulting a Muslim ruler makes him look weak and undermines respect for the Shariah. Indeed, applying the Shariah honors the legislation.