Leiningen is the owner of a prosperous plantation in Brazil (what he grows is never specified in the story, though a reference to granaries is made; the film makes it a cocoa plantation) who has received word that an army ant swarm, ten miles long and two miles wide, is heading in the direction of his plantation, eating everything living thing in their path. Leiningen, an analytical man, refuses to give up all he's worked for in establishing the plantation and sees the ants, not as an "act of God," but as a problem to be solved, and one he'd already put some thought into before establishing his plantation. Rallying his workers to him, Leiningen makes his stand against the ants.
He opens flood-gates and fills a 12-foot wide moat around the property. The ants begin throwing leaves into the water to create a pontoon, and when that fails, begin to bridge the water with the drowned bodies of ants pushed into the water to allow the swarm to cross.
Leiningen sprays the swarm with gasoline, both to set them alight and disrupt their chemical sensory organs. And if he had an infinite amount of gasoline, this might serve to destroy the ants, but they keep coming and coming and eventually he will run out.
Finally, with his men fortified in the plantation house, surrounded by a last-ditch moat of gasoline that has been set on fire, Leiningen conceives of a plan that might rid not only his plantation, but all in the area of the menace of the ants. But to do so, he's going to have to venture out among the swarm...
"Leiningen Versus the Ants" is a classic story of Man vs. Nature, and makes a pretty evenly-matched fight of it. As noted above, Leiningen is a rational, analytical man; he plans meticulously and for all possible contingencies, having allowed for periodic outbreaks of army ants in selecting a site upon which to build his plantation and in the design and layout of the property. All in all, he uses his glorious human brain to its utmost in defense of what he's worked so hard to achieve.
On the other hand, the ants are soulless creatures, driven entirely be instinct and the all-consuming desire to consume, reproduce and survive. No, scratch that; the ants on display here - gruesome creatures the size of a man's thumb and equipped with both slicing mandibles and a nasty, venomous sting - aren't driven to reproduce; they're workers and warriors, they're driven to ensure the Queen can reproduce. The ants besieging Leiningen's plantation are essentially robots or zombies in their utter enslavement to the will of the Queen, wherever she may be in the twenty square miles the ants cover.
With their utter implacability and the gruesome manner in which they swiftly devour their prey (not, in general terms, things like cows or deer or people, but larger insects, spiders and scorpions tend to be fair game), army ants are a staple of pulp jungle adventures; a man being skeletonized by hungry ants is referenced in "The Master Magician," earlier in The Big Book of Adventure Stories, and of course they formed the basis of the "gruesome death sequence of Pat Roach's lookalike" in INDIANA JONES AND THE KINGDOM OF THE CRYSTAL SKULL, as much as I, at least, would like to forget that film was ever made.
Speaking of film, as mentioned above Charlton Heston starred as Leiningen in the film adaptation, and truth be told I can't imagine anyone else in the role. Reading Stephenson's description of Leiningen, all I can picture are Heston's steely eyes and the defiant set of his jaw. Talk about great casting.