To ensure food security, maize (Zea mays) is a model crop for understanding useful traits underlying stress resistance. In contrast to foliar biochemicals, root defenses limiting the spread of disease remain poorly described. To better understand belowground defenses in the field, we performed root metabolomic profiling and uncovered unexpectedly high levels of the sesquiterpene volatile beta-selinene and the corresponding nonvolatile antibiotic derivative beta-costic acid. The application of metabolite-based quantitative trait locus mapping using biparental populations, genome-wide association studies, and near-isogenic lines enabled the identification of terpene synthase21 (ZmTps21) on chromosome 9 as a beta-costic acid pathway candidate gene. Numerous closely examined beta-costic acid-deficient inbred lines were found to harbor Zmtps21 pseudogenes lacking conserved motifs required for farnesyl diphosphate cyclase activity. For biochemical validation, a full-length ZmTps21 was cloned, heterologously expressed in Escherichia coli, and demonstrated to cyclize farnesyl diphosphate, yielding beta-selinene as the dominant product. Consistent with microbial defense pathways, ZmTps21 transcripts strongly accumulate following fungal elicitation. Challenged field roots containing functional ZmTps21 alleles displayed beta-costic acid levels over 100 mug g(-1) fresh weight, greatly exceeding in vitro concentrations required to inhibit the growth of five different fungal pathogens and rootworm larvae (Diabrotica balteata). In vivo disease resistance assays, using ZmTps21 and Zmtps21 near-isogenic lines, further support the endogenous antifungal role of selinene-derived metabolites. Involved in the biosynthesis of nonvolatile antibiotics, ZmTps21 exists as a useful gene for germplasm improvement programs targeting optimized biotic stress resistance.