While it’s not morally wrong to unintentionally step on an ant while walking outside, I believe it’s morally wrong to go out of your way to kill something. However, if ants come into your lovely little pristine home, it is sort of okay to kill them to protect the home and any pets you might have.
This thought process is because the killing of an insect, by most human standards, is not considered immoral because most people don't look at ants or insects the same way they look at animals, such as a dog or cat. Also, certain religions may frown upon killing any living thing. Buddhism, for example, generally does not condone any killing.
If we are going to truthful to ourselves, everybody knows that ants are very disgusting, and most of us hate seeing them around. I think we need to consider some things before we can conclude whether it is right to kill ants or not. You can only justify my action to be immoral if I've been rightly treated by someone or anything, but I ended up acting very ruthless to the person. If you have had a serious encounter with ants, you will understand this better. You can't sit comfortably or sleep the way you like whenever you have a group of ants parading your room.
In fact, if you are not careful, some ants can bite you or inject something harmful into your body. In this case, there is no way you will not want to kill them. However, what I don't support is the killing of ants for no reason. Some people can't stand the sight of anything that looks like an ant; as a result, they don't mind killing every ant in their surroundings.