Hudhayfah bin al-Yaman (may Allah be pleased with him) narrates from the Prophet (peace and blessings be upon him) that the Prophet (peace and blessings be upon him) said: "You will surely enjoin good and forbid evil, or else Allah will send upon you a punishment from Himself. Then you will supplicate to Allah, and Allah will not answer your supplications."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب آداب القاضي / 20199