It is narrated from Azhar bin Abdullah that Sayyiduna Ubadah bin al-Samit (may Allah be pleased with him) set out from Syria for Hajj. When he reached Madinah, he came to Sayyiduna Uthman bin Affan (may Allah be pleased with him) and said: "Shall I not tell you something I heard from the Messenger of Allah (peace and blessings be upon him)?" He said: "Of course (do tell me)." Ubadah (may Allah be pleased with him) said: I heard the Messenger of Allah (peace and blessings be upon him) saying: "Soon there will be commanders (rulers) over you who will order you to do the good deeds that you recognise (by the Shari'ah) as ma'ruf (good), but they themselves will do things that you recognise as munkar (evil). Such people are owed no obedience by you (in those wrongs)."
This hadith is the basis of the legal principle that there is no obedience to any creature in disobedience to the Creator.
Hadith Referenceالمطالب العالية بزوائد المسانيد الثمانية / كتاب الخلافة والإمارة / 2161
Hadith Gradingمحدثین:إسناده ضعيف
Hadith Takhrij«حکم الحدیث المطالب العالیہ محققاً تنسیق د. سعد بن ناصر بن عبد العزيز الشَّثري- مکتبہ شاملہ :إسناده ضعيف. » «أخرجه المطالب العالية لابن حجر برقم: 4347، وأخرجه مصنف ابن أبي شيبة برقم: 38876»