Abu Hurairah reported,

The Messenger of Allah ﷺ sent us out on an expedition and said to us, "If you come across so-and-so and so-and-so," naming two men from Quraysh, "burn them with fire."Then, when we came to bid him farewell as we were about to depart, he said, "I had ordered you to burn so-and-so and so-and-so with fire, but no one punishes with fire except Allah. So if you capture them, kill them instead."

Bukhari 2954

Sahih

وقال ابن وهب أخبرني عمرو، عن بكير، عن سليمان بن يسار،

عن أبي هريرة رضى الله عنه أنه قال

بعثنا رسول الله ﷺ في بعث، وقال لنا إن لقيتم فلانا وفلانا. لرجلين من قريش سماهما فحرقوهما بالنار. قال ثم أتيناه نودعه حين أردنا الخروج فقال إني كنت أمرتكم أن تحرقوا فلانا وفلانا بالنار، وإن النار لا يعذب بها إلا الله، فإن أخذتموهما فاقتلوهما.

البخاري 2954صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Jihad and expeditions
Chapter
Bidding farewell
Numbering
Darussalam 2954
Bukhari 2954