Sahih al-Bukhari, Book 56, Hadith 228 (Bukhari 2897)

Narrated Abu Hurairah (ra):

I heard Allah's Messenger (ﷺ) saying, "An ant bit a Prophet amongst the Prophets, and he ordered that the place of the ants be burnt. So, Allah inspired to him, 'It is because one ant bit you that you burnt a nation amongst the nations that glorify Allah?"