The Prophet ﷺ burned and cut down the palm trees of Banu Nadir, the place known as Buwayrah, and then this was revealed, "Whatever palm trees you cut down or left standing on their roots, it was by Allah's permission" [Hashr 59:5].
حرق النبي ﷺ نخل بني النضير- وقطع وهي البويرة- فنزلت: {ما قطعتم من لينة أو تركتموها قائمة على أصولها فبإذن الله} [الحشر: ٥].
Bukhari narrated it in the book of military expeditions (4031) and Muslim in the book of jihad (1746), both from the hadith of Layth, from Nafi, from Ibn Umar, who mentioned it.