'Ali (Allaah be pleased with him) said "The Messenger of Allahﷺ sent an army and appointed a man as a commander for them and he commanded them to listen to him and obey. He kindled fire and ordered them to jump into it. A group refused to enter into it and said "We escaped from the fire; a group intended to enter into it. When the Prophet ﷺ was informed about it, he said "Had they entered into it, they would have remained into it. There is no obedience in matters involving disobedience to Allaah. Obedience is in matters which are good and universally recognized.
The values taught by this Hadith are loyalty towards God, obedience towards His commands and refraining from acts of disobedience even if commanded by someone else.