Coevolutionary antagonism generates relentless selection that can favour genetic exchange, including transfer of antibiotic synthesis and resistance genes among bacteria, and sexual recombination of disease resistance alleles in eukaryotes. We report an unusual link between biological conflict and DNA transfer in bdelloid rotifers, microscopic animals whose genomes show elevated levels of horizontal gene transfer from non-metazoan taxa. When rotifers were challenged with a fungal pathogen, horizontally acquired genes were over twice as likely to be upregulated as other genes — a stronger enrichment than observed for abiotic stressors. Among hundreds of upregulated genes, the most markedly overrepresented were clusters resembling bacterial polyketide and nonribosomal peptide synthetases that produce antibiotics. Upregulation of these clusters in a pathogen-resistant rotifer species was nearly ten times stronger than in a susceptible species. By acquiring, domesticating, and expressing non-metazoan biosynthetic pathways, bdelloids may have evolved to resist natural enemies using antimicrobial mechanisms absent from other animals.