A:
It is permissible to get rid of harmful ants etc. By all possible means. However, burning ants is declared Haram (prohibited) by the prophet (peace be upon him). May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.