(39) باب النَّهْىِ عَنْ قَتْلِ النَّمْلِ،
Abu Huraira reported Allah's Messenger (ﷺ) as saying:
An ant had bitten a Prophet (one amongst the earlier Prophets) and he ordered that the colony of the ants should be burnt. And Allah revealed to him:" Because of an ant's bite you have burnt a community from amongst the communities which sings My glory."
Reference: Sahih Muslim 2241 a
In-book reference: Book 39, Hadith 200
USC-MSA web (English) reference(deprecated numbering scheme): Book 26, Hadith 5567