Ali bin Abu Talib reported,

The Messenger of Allah ﷺ sent out an army and placed a man in command over them. The commander kindled a fire and ordered, "Enter it."Some of the men were about to enter, but others said, "We only fled from the fire by accepting Islam."The matter was mentioned to the Messenger of Allah ﷺ. He said to those who had intended to enter it, "Had you entered it, you would have remained in it until the Day of Resurrection."To the others he spoke kindly, then he said, "There is no obedience in disobedience to Allah. Obedience is only in what is right."

Ahmad 724

Sahih

حدثنا محمد بن جعفر حدثنا شعبة عن زبيد الإيامي عن سعد بن عبيدة عن أبي عبد الرحمن

عن علي رضي الله عنه

أن رسول الله ﷺ بعث جيشا وأمر عليهم رجلا فأوقد نارا فقال ادخلوها فأراد ناس أن يدخلوها وقال آخرون إنما فررنا منها فذكر ذلك لرسول الله ﷺ فقال للذين أرادوا أن يدخلوها لو دخلتموها لم تزالوا فيها إلى يوم القيامة وقال للآخرين قولا حسنا وقال لا طاعة في معصية الله إنما الطاعة في المعروف

أحمد 724صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Ali bin Abu Talib
Numbering
Darussalam 724
Ahmad 724