Sahih Muslim Book 26, Hadith Number 5567.

Chapter : Prohibition of killing the ants.

Abu Huraira reported Allah’s Messenger (may peace be upon him) 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.”