No Obedience For Evil Deeds
[Hadith, Bukhari, Book #91, Hadith #363]
Narrated Ali: The Prophet sent an army and appointed some men their commander. The man made a fire and then said (to the soldiers), “Enter it.” Some of them intended to enter it while some others said, ‘We have run away from it (i.e., embraced Islam to save ourselves from the ‘fire’).” They mentioned that to the Prophet, and he said about people who had intended to enter the fire. ”If they had entered it, they would have remained in it till the Day of Resurrection.” Then he said to others, “No obedience for evil deeds, obedience is required only for what is good.”
[Hadith, Muslim, Book #020, Hadith#4536]
It has been narrated on the authority of All who said: The Messenger of Allah (may peace be upon him) sent an expedition and appointed over the Mujahids a man from the Ansar. (While making the appointment), He ordered that his work should be listened to and obeyed. They made him angry in a matter. He said: Collect for me dry wood. They collected it for him. Then he said: Kindle a fire. They kindled (the fire). Then he said: Didn’t the Messenger of Allah (may peace be upon him) order you to listen to me and obey (my orders)? They said: Yes. He said: Enter the fire. The narrator says: (At this), they began to look at one another and said: We fled from the fire to (find refuge with) the Messenger of Allah (may peace be upon him) (and now you order us to enter it). They stood quietly until his anger cooled down, and the fire went out. When they returned, they related the incident to the Messenger of Allah (may peace be upon him). He said: If they had entered it, they would not have come out. Obedience (to the commander) is obligatory only in what is good.

