The Messenger of Allah ﷺ sent us out on an expedition and said, "If you find so-and-so and so-and-so," naming two men from Quraysh, "burn them with fire."Then, when we were about to set out, the Messenger of Allah ﷺ said, "I had ordered you to burn so-and-so and so-and-so with fire, but only Allah punishes with fire. So if you find them, kill them instead."
حدثنا قتيبة حدثنا الليث عن بكير بن عبد الله عن سليمان بن يسار
بعثنا رسول الله ﷺ في بعث فقال إن وجدتم فلانا وفلانا لرجلين من قريش فأحرقوهما بالنار ثم قال رسول الله ﷺ حين أردنا الخروج إني كنت أمرتكم أن تحرقوا فلانا وفلانا بالنار وإن النار لا يعذب بها إلا الله فإن وجدتموهما فاقتلوهما
SourcingBukhari also related it in the Book of Jihad and Expeditions, chapter, "No One Should Be Punished with Allah's Punishment," hadith no. 3016, from Qutayba, with the same wording.On this topic there is also a hadith from Ibn Abbas [mentioned previously at no. 1458] and from Hamza bin Amr Aslami [Abu Dawud, no. 2673, and Ahmad, 3/494].