مشكوة المصابيح Mishkat al-Masabih كتاب الإمارة والقضاء The Book of Leadership and Judiciary
(لَا طَاعَةَ لِمَخْلُوقٍ فِي مَعْصِيَةِ الخَالِقِ)

(There is no obedience to the created in disobedience to the Creator)

1 hadith
Hadith 3665
وَعَنْ عَلِيٍّ رَضِيَ اللَّهُ عَنْهُ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «لَا طَاعَةَ فِي مَعْصِيَةٍ إِنَّمَا الطَّاعَةُ فِي الْمَعْرُوف»
‘Ali reported God’s Messenger as saying, “No obedience is to be given in the case of an act of disobedience to God, obedience is to be given only regarding what is reputable.” (Bukhari and Muslim.)
Hadith Reference Mishkat al-Masabih / The Book of Leadership and Judiciary / Hadith: 3665
Hadith Grading الألبانی: مُتَّفَقٌ عَلَيْهِ  |  زبیر علی زئی: متفق عليه
Hadith Takhrij ´تحقيق و تخريج: محدث العصر حافظ زبير على زئي رحمه الله` «متفق عليه، رواه البخاري (7257) و مسلم (1840/39)»