Queens of leaf-cutting ants found their nests singly, each consisting of a vertical tunnel and a final horizontal chamber. Because of the claustral mode of nest founding, the queen and/or her initial fungus garden are exposed to threats imposed by several soil pathogens, and the antibiotic secretions produced by their metapleural glands are considered a main adaptation to deal with them. Nests of two Atta leaf-cutting ant species, Atta vollenweideri and Atta sexdens rubropilosa, occur in different soil types, alfisols and oxisols. Their queens are known to excavate the initial nest in different soil horizons, clayish and organic, respectively, which differ in their fertility and associated microbiota. The aim of the present study was to comparatively investigate the morpho-physiology of the metapleural glands in queens of A. vollenweideri and A. sexdens rubropilosa, addressing the question whether the distinct selective pressure imposed by the microbiota in the two different soil types led to morpho-physiological differences in the metapleural glands that were consistent with their antiseptic function. The results revealed that metapleural glands of A. sexdens rubropilosa have a larger number of secretory cells, and consequently a higher production of antibiotic secretions, which may have been selected to allow nest founding at the superficial horizon of oxisols rich in organic matter and microorganisms. Glands of A. vollenweideri, on the contrary, presented fewer secretory cells, suggesting less production of antibiotic secretions. We argue that the excavation of deep founding nests in A. vollenweideri was primarily selected for during evolution to avoid the risk posed by flooding, and further hypothesize that a reduced number of cells in their metapleural glands occurred because of a weak pathogen-driven selective pressure at the preferred soil depth.