It works, but it's dangerous and a lot of work. There are easier ways.
If these are fire ants, go to a feed store and buy a few sacks of dry molasses, then broadcast it on your lawn, and especially on the mounds. Fire ants hate it, and will go away.
For other types of ants, if you don't mind waiting a few days for the ants to die, you can bait them with honey and boric acid (get the boric acid powder from a pharmacist -- NOT the same thing as laundry Borax.).
Mix 2 cups of honey and 4 teaspoons of boric acid, and then add enough water to make it thin enough to pour but not really liquid. Loosely pack some small jars with cotton balls or wads of toilet paper, then add your goo. Punch holes in the jar lids and screw them back on the jars. Place the jars on their sides near ant hills. You can put a bit of extra (plain) honey on the outside to make them even more attractive.
The business of the jars is to keep kids and pets away from the boric acid itself, as it's toxic and you don't want them getting directly into it. The ants will ingest the goo and carry it back to the nest as food, where it be will be eaten by and dehydrate the ants, including the all-important queen. In a few days they will all die.