Abu Hurairah reported,

The Prophet of Allah ﷺ said, "One of the prophets was bitten by an ant, so he ordered that the ants' colony be burned, and it was burned. Then Allah عز وجل revealed to him, 'Because a single ant bit you, you have destroyed a whole community that glorified Me.'"Muhammad bin Yahya reported to us that Abu Salih told them that Layth related to him from Yunus, from Ibn Shihab, with his chain of transmission, a similar account, except that he said "bit" in the feminine form.

Ibn Majah 3225

Sahih

حدثنا أحمد بن عمرو بن السرح وأحمد بن عيسى المصريان قالا حدثنا عبد الله بن وهب أخبرني يونس عن ابن شهاب عن سعيد بن المسيب وأبي سلمة بن عبد الرحمن

عن أبي هريرة

عن نبي الله ﷺ قال إن نبيا من الأنبياء قرصته نملة فأمر بقرية النمل فأحرقت فأوحى الله عز وجل إليه في أن قرصتك نملة أهلكت أمة من الأمم تسبح حدثنا محمد بن يحيى حدثنا أبو صالح حدثني الليث عن يونس عن ابن شهاب بإسناده نحوه وقال قرصت

ابن ماجه 3225صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Ibn Majah
Book
Hunting
Chapter
What is forbidden to kill
Numbering
Darussalam 3225
Ibn Majah 3225