If ants construct a colony where electrical wires come into your home, the danger of short-circuiting and potential fires is real. An electrical wire short circuit can cause wires to ignite. Some ants have an attraction for electricity. For instance, the United Kingdom is home to a species of "Kamikaze ants" that thrive on electrical current. The Asian Super Ant, lasius neglectus, has an attraction for electrical current. Homeowners with less exotic types of ant infestation can still use some of the techniques used against these kamikaze ants, such as seasonally spraying and dusting electrical wires with a variety of substances that repel or kill ants.
Spray peppermint on the inside of electrical boxes, but not on the wires. You can also place unwrapped peppermint candy inside the electrical box to keep ants from coming into the house on the electrical wires. Ants are repelled by peppermint.
Sprinkle ground cinnamon in the holes where electrical wires run into your home. Ants do not like cinnamon and they will not cross a barrier of the spice.
Mix an industrial-strength pesticide in accordance to the directions to use in a garden sprayer. Spray the siding of your home around the electrical box. Do not spray the pesticide directly on the wires. Wipe the box itself down with the pesticide, being careful not to get the wires inside wet.
Create a barrier around the foundation of your home with pesticide crystals that soak into the soil. If you stop the ants from getting to your house, you will reduce the number attracted to the electrical wires leading into your home.