Commentary :
Islam preaches mercy to all Allah’s Creation: human beings, Jinn, animals, and birds. It enjoins Muslims to show mercy to all creatures and forbids them from vainly killing living beings for no real benefit. Moreover, it fosters people’s interests and protects them from loss and harm. This is why Allah, Exalted is He, admonished one of His Prophets for burning the place of the ants because one ant had bitten him. The Prophetﷺ said, "An ant bit a Prophet of Allah once, and he ordered that the place of the ants be burnt. So, Allah, Exalted is He, inspired to him, 'It is because one ant bit you that you burnt a nation amongst the nations that glorify Allah?’" This means that he ordered a whole nation that glorified Allah, Exalted is He, to be burnt because of one ant that had bitten him!
It should be noted that Allah, Exalted is He, admonished this Prophet for doing Khilaaf Al-Awlaa (i.e., an undesirable, yet permissible act that is not the best choice from a number of alternatives, contradicting that which is most appropriate and what is religiously superior under ordinary circumstances). This means that it would have been better for him to punish only the ant that had bitten him, and were he to do so, Allah, Exalted is He, would not have admonished him. However, He admonished him for exceeding the proper limits and burning the whole colony of ants!
It is deduced from the hadeeth that the punishment must be in proportion to the crime committed and must not be executed on anyone other than the perpetrator.
The hadeeth also highlights the gravity of burning living beings with fire..