كتاب الجهاد والسير
32  
The Book of Jihad and Expeditions
(10)
Chapter: Permissibility of cutting down the trees of the Kuffar and burning them
(10)
باب جَوَازِ قَطْعِ أَشْجَارِ الْكُفَّارِ وَتَحْرِيقِهَا ‏‏
Sahih Muslim 1746 b

It is narrated on the authority of Ibn Umar that the Messenger of Allah (ﷺ) caused the date-palms of Banu Nadir to be cut down and burnt. It is in this connection that Hassan (the poet) said:

It was easy for the nobles of Quraish to burn Buwaira whose sparks were flying in all directions, in the same connection was revealed the Qur'anic verse:" Whatever trees you have cut down or left standing on their trunks."
حَدَّثَنَا سَعِيدُ بْنُ مَنْصُورٍ، وَهَنَّادُ بْنُ السَّرِيِّ، قَالاَ حَدَّثَنَا ابْنُ الْمُبَارَكِ، عَنْ مُوسَى، بْنِ عُقْبَةَ عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَطَعَ نَخْلَ بَنِي النَّضِيرِ وَحَرَّقَ وَلَهَا يَقُولُ حَسَّانُ وَهَانَ عَلَى سَرَاةِ بَنِي لُؤَىٍّ حَرِيقٌ بِالْبُوَيْرَةِ مُسْتَطِيرُ وَفِي ذَلِكَ نَزَلَتْ ‏{‏ مَا قَطَعْتُمْ مِنْ لِينَةٍ أَوْ تَرَكْتُمُوهَا قَائِمَةً عَلَى أُصُولِهَا‏}‏ الآيَةَ ‏.‏
Reference : Sahih Muslim 1746b
In-book reference : Book 32, Hadith 34
USC-MSA web (English) reference : Book 19, Hadith 4325
  (deprecated numbering scheme)