Do Ants Eat Worms? A Look at Their Diet and Behavior

Many ant species do eat worms, particularly earthworms, though this is far from universal across the roughly 20,000 known ant species. Some ants have evolved specialized body structures and hunting strategies specifically for capturing earthworms, while others will scavenge a dead worm opportunistically but would never hunt a live one. Whether a given colony targets worms depends on the ant species, the habitat, and what else is on the menu, because ants as a group are among the most dietary flexible animals on the planet.

Which Ants Hunt Earthworms

The best-documented earthworm hunters are African driver ants, massive colonies that conduct swarm raids through leaf litter and topsoil. Research on driver ant food preferences found that they prey primarily on insects, arachnids, and earthworms, making worms a staple rather than an occasional snack.1Annals of the Entomological Society of America. Predatory Behavior and Food Preferences of Driver Ants in Selected African Habitats These ants are nomadic, relocating their colonies periodically, and studies in the Mount Kenya forest have tracked how their swarm raids measurably reduce local earthworm populations in the soil they pass through.2Insectes Sociaux. Influence of driver ant swarm raids on earthworm prey densities in the Mount Kenya forest

Another striking example is the African ponerine ant Psalidomyrmex procerus, which has evolved elongated mandibles specifically adapted for seizing long-bodied prey like earthworms. When a worker encounters a relatively small earthworm, it simultaneously grabs the anterior end and stings. The venom paralyzes the worm so quickly that the worm cannot shed its tail end through a defensive process called autotomy, a self-amputation that earthworms use to escape predators. That speed matters because with larger earthworms, if the ant grabs the wrong end first, the worm detaches the seized portion and the rest of it escapes into the soil.3PubMed Central. The predatory behavior of ants: an impressive panoply of morphological adaptations The existence of mandibles fine-tuned for worm capture tells you this is not an accidental dietary overlap. Some ants have been under evolutionary pressure to get better at catching worms for a very long time.

Beyond these specialists, many generalist predatory ants will take earthworms when the opportunity arises, especially small or injured ones. Fire ants, for instance, are aggressive omnivores that scavenge or kill a wide range of soil invertebrates, worms included. But for most ant species you would find in a backyard, earthworms are not a regular target. The worm is simply too large and too slimy for a small colony of pavement ants or odorous house ants to deal with easily.

How Earthworms Defend Themselves

Earthworms are not helpless against ant attacks. The most interesting defense is chemical. Laboratory experiments with red wood ants (Formica aquilonia) and earthworms found that earthworm mucus actively repelled the ants, acting as a chemical deterrent. The researchers noted that earthworms living inside ant nest mounds did not try to physically avoid contact with ants. Instead, the mucus coating their bodies appeared to be doing the defensive work for them.4Oecologia. Nest mounds of red wood ants (Formica aquilonia): hot spots for litter-dwelling earthworms

That finding adds a layer of complexity to the ant-versus-worm dynamic. Red wood ant nest mounds turn out to be favorable habitat for earthworms because the decomposing organic material ants pile up creates nutrient-rich, well-aerated soil. Earthworms are drawn to these mounds, and the mucus defense allows them to coexist with the ants rather than being devoured by them.4Oecologia. Nest mounds of red wood ants (Formica aquilonia): hot spots for litter-dwelling earthworms So the relationship is not purely predator-prey. In some cases, ants and worms end up sharing the same real estate through a chemical truce.

The autotomy response mentioned earlier is the other major defense. When a worm is grabbed partway along its body, it can shed the captured section the way a lizard drops its tail. For a specialized ant like Psalidomyrmex, the whole hunting strategy revolves around striking fast enough to prevent this escape. For less specialized ants, a large earthworm that sheds a piece and burrows away has effectively won the encounter, even if the ants walk off with a free meal.

What Ants Eat Beyond Worms

Earthworms are just one item on an enormous and varied menu. Ants collectively eat almost everything organic: other insects, seeds, fungi, plant nectar, honeydew excreted by aphids, carrion, fruit, and in some species, each other. What a particular colony eats depends heavily on species and ecosystem. Some ants, like leafcutters, are essentially farmers who cultivate fungus gardens and eat nothing else. Others, like the weaver ant Oecophylla smaragdina, combine sugar sources with animal protein. Feeding experiments with weaver ants found that colonies consumed roughly three-quarters of their diet as sugar and about a quarter as insect prey by dry weight.5Journal of Applied Entomology. Oecophylla smaragdina food conversion efficiency: prospects for ant farming

The predatory species are the ones most likely to eat worms. Formica obscuripes, a mound-building ant common in North America, is known for preying on many insect species found on black cherry trees, including eastern tent caterpillars. These ants can only take down the caterpillars when they are small, within about three weeks of hatching, because after that the caterpillars grow large enough to escape.6Ecology. Cherries, Ants and Tent Caterpillars: Timing of Nectar Production in Relation to Susceptibility of Caterpillars to Ant Predation The same size-dependent logic applies to earthworms. A small, surface-dwelling worm is vulnerable. A large, deeply burrowed one is mostly out of reach.

Why Ant Colonies Need Both Sugar and Protein

The reason ants eat both sweet substances and animal prey comes down to a division of labor inside the colony. Adult worker ants run on carbohydrates. They need sugar for the energy to forage, build, and defend the nest. But the larvae need protein to grow, and protein largely comes from animal sources like insects and, yes, worms. Research on ant nutrition has established that carbohydrates fuel the workers while proteins are consumed primarily by the larvae, and the colony adjusts its foraging behavior based on feedback from both groups.7PubMed. Communal nutrition in ants

This split explains why you might see the same ant species visiting a sugar source one day and dragging home a dead insect the next. The colony is balancing its nutritional budget. When larvae are plentiful and growing fast, foragers shift toward protein-rich food. When the colony is mostly adult workers maintaining the nest, sugar takes priority. Earthworms, being protein-dense and often available in the soil near or even inside ant nests, represent a convenient protein source for species equipped to handle them.

In some species, larvae do more than just consume food. Research on harvester ants of the genus Veromessor and the predatory ant Manica bradleyi suggests that larvae may actually digest certain foods on behalf of the colony. Workers bring seeds or other tough food items to the larvae, which process them and regurgitate partially digested material back to the adults.8Oxford Academic. Feeding and Digestion in Some Ants (Veromessor and Manica) The colony functions as a collective digestive system, with different members handling different stages of food processing. An earthworm brought back to the nest would likely be dismembered and fed to larvae, which extract the protein and share nutrients outward.

Worms You Can and Cannot Feed to Pet Ant Colonies

If you keep ants as a hobby, the question of whether to feed them worms comes up naturally. Small, soft-bodied worms like fruit fly larvae (which are technically maggots, not earthworms) are widely used in ant keeping and accepted by most predatory species without issue. Actual earthworms are trickier. A full-sized garden worm is far too large for a small colony to subdue, and the mucus coating can deter species that are not specialized worm hunters. Cut pieces of earthworm are sometimes offered by hobbyists, and many species will scavenge on them, but the acceptance rate varies. Some colonies ignore worm pieces entirely in favor of crickets or mealworms.

The general principle for feeding protein to captive ant colonies is to match prey size to colony size and species temperament. Aggressive, large-mandible species like Harpegnathos or larger Camponotus will tackle bigger protein items. Smaller, timid species do better with pre-killed insects or soft larvae. Earthworm pieces can work as an occasional supplement but rarely serve as a colony’s primary protein source in captivity, partly because of the mucus issue and partly because worm tissue degrades and molds quickly in a humid formicarium.

Ants and Earthworms as Soil Engineers

The predator-prey relationship between ants and earthworms sits within a larger ecological context where both groups are doing similar jobs. In temperate ecosystems, earthworms and ants are the two most important organisms for bioturbation, which is the mixing and restructuring of soil through biological activity.9Ecosystems. Ant and Earthworm Bioturbation in Cold-Temperate Ecosystems Earthworms tunnel through soil, mixing organic matter downward and bringing mineral soil up. Ants excavate chambers and galleries, moving enormous quantities of earth grain by grain. Both groups modify soil structure, water infiltration, and nutrient cycling in ways that affect entire plant communities.

As soil engineers, earthworms and ants play major roles in soil functioning, particularly in modifying the physical and chemical properties of the ground they inhabit.10Paddy and Water Environment. Different effects of earthworms and ants on soil properties of paddy fields in North-East Thailand They are often called ecosystem engineers because of their profound effects on ecosystem structure and function.11Frontiers for Young Minds. The Adventures and Challenges of Soil Engineers So while some ants eat some earthworms, both are performing overlapping and complementary ecological services. Removing either group from a habitat would change the soil in ways that cascade through the food web.

This dual role makes the interaction between ants and earthworms ecologically interesting beyond simple predation. In a forest, driver ant raids may temporarily reduce earthworm numbers in a given patch of soil, but the ants’ own nest-building activity loosens and aerates the ground in ways that benefit the worms that recolonize after the swarm moves on. And as the red wood ant research showed, earthworms sometimes thrive specifically inside ant nest structures, feeding on the accumulated organic debris while their mucus keeps them off the menu.

When Worms Parasitize Ants

The tables sometimes turn entirely. Ants serve as hosts for a variety of nematode parasites, tiny roundworms that are a completely different group from earthworms.12Psyche: A Journal of Entomology. Nematode Parasites and Associates of Ants: Past and Present These nematodes can use ants as developmental hosts, intermediate hosts, or carriers depending on the nematode species. Some infect ant larvae and develop inside them. Others hitch a ride in the ant’s gut to reach their next host. The parasitic worms can alter ant behavior, reduce colony fitness, and in heavy infections, kill individual workers.

The distinction matters because when people ask “do ants eat worms,” they usually picture earthworms, the fat pink things in garden soil. But the broader worm world includes organisms that exploit ants rather than the other way around. Mermithid nematodes, for example, can grow inside an ant’s body cavity until they are longer than the ant itself, eventually bursting out to complete their life cycle in the soil. It is one of the more nightmarish examples of parasitism in insects, and it happens across many ant genera worldwide.

Parasitic nematodes also create indirect ecological links between ants and earthworms. Some nematode species that infect ants have free-living soil stages where they coexist with earthworms in the same microhabitat. The soil that earthworms churn and aerate is the same soil where nematode eggs and juveniles wait to encounter their next ant host. The underground world is a tangled web of consumption, parasitism, and coexistence that makes a simple “do ants eat worms” question more interesting the deeper you dig into it.

Specialized Mandibles and the Evolution of Worm Hunting

The morphology of worm-hunting ants reveals how seriously natural selection has treated earthworms as a food source. The elongated, forceps-like mandibles of Psalidomyrmex procerus are not general-purpose tools. They are shaped to grip a cylindrical, muscular, mucus-coated body that is actively trying to retract into the soil. The speed of the sting is equally adapted: an earthworm that is not paralyzed within a fraction of a second will either autotomize its captured section or generate enough muscular force to pull free from the ant’s grip.3PubMed Central. The predatory behavior of ants: an impressive panoply of morphological adaptations

This kind of morphological specialization tells evolutionary biologists that worm-eating is not a recent or casual development for these ant lineages. Structures like modified mandibles evolve over many thousands of generations of selection pressure, meaning earthworms have been a reliable enough food source for long enough that ant populations with better worm-catching tools consistently outcompeted those without. The arms race goes both ways: earthworm mucus chemistry, autotomy ability, and burrowing speed have all been shaped in part by the selective pressure of ant predation. Neither side of this evolutionary contest appears to be winning decisively, which is why both worm-eating ants and ant-repelling earthworms persist together in the same habitats across tropical and temperate forests.

Not all mandible adaptations point toward worm eating, of course. Trap-jaw ants have spring-loaded mandibles for stunning fast-moving prey. Leaf-cutter ants have saw-toothed mandibles for cutting vegetation. The diversity of ant mandible shapes reflects the diversity of ant diets, and the worm specialists are just one branch of a remarkably varied family tree of feeding strategies. If you ever look at an ant under magnification and its jaws resemble long, curved tweezers, there is a reasonable chance earthworms are somewhere in its ancestry of preferred meals.