When the Messenger of Allah ﷺ amputated the limbs of those who had stolen his milk-camels and seared their eyes with fire, Allah rebuked him for that, and Allah Most High revealed "The recompense of those who wage war against Allah and His Messenger" [Maidah 5:33], the entire verse.
أخبرنا أحمد بن عمرو بن السرح قال أنبأنا ابن وهب قال أخبرني الليث عن ابن عجلان
أن رسول الله ﷺ لما قطع الذين سرقوا لقاحه وسمل أعينهم بالنار عاتبه الله في ذلك فأنزل الله تعالى {إنما جزاء الذين يحاربون الله ورسوله} الآية كلها
[Its isnad is daif] It is found in al-Kubra, no. 3505, and it has two defects, the disconnection (irsal), and the tadlis of Muhammad bin Ajlan, no. 1271.