Known as the smell of earth after rain, geosmin is an odorous terpene detectable by humans at picomolar concentrations. Geosmin production is heavily conserved in actinobacteria, myxobacteria, cyanobacteria, and some fungi, but its biological activity is poorly understood. We theorized that geosmin was an aposematic signal used to indicate the unpalatability of toxin-producing microbes, discouraging predation by eukaryotes. Consistent with this hypothesis, we found that geosmin altered the behavior of the bacteriophagous nematode Caenorhabditis elegans on agar plates in the absence of bacteria. Normal movement was restored in mutant worms lacking differentiated ASE (amphid neurons, single ciliated endings) neurons, suggesting that geosmin is a taste detected by the nematodal gustatory system. In a predation assay, geosmin and the related terpene 2-methylisoborneol reduced grazing on the bacterium Streptomyces coelicolor. Predation was restored by the removal of both terpene biosynthetic pathways or the introduction of C. elegans that lacked differentiated ASE taste neurons, leading to the apparent death of both bacteria and worms. While geosmin and 2-methylisoborneol appeared to be nontoxic, grazing triggered bacterial sporulation and the production of actinorhodin, a pigment coproduced with a number of toxic metabolites. In this system, geosmin thus appears to act as a warning signal indicating the unpalatability of its producers and reducing predation in a manner that benefits predator and prey. This suggests that molecular signaling may affect microbial predator-prey interactions in a manner similar to that of the well-studied visual markers of poisonous animal prey. IMPORTANCE One of the key chemicals that give soil its earthy aroma, geosmin is a frequent water contaminant produced by a range of unrelated microbes. Many animals, including humans, are able to detect geosmin at minute concentrations, but the benefit that this compound provides to its producing organisms is poorly understood. We found that geosmin repelled the bacterial predator Caenorhabditis elegans in the absence of bacteria and reduced contact between the worms and the geosmin-producing bacterium Streptomyces coelicolor in a predation assay. While geosmin itself appears to be nontoxic to C. elegans, these bacteria make a wide range of toxic metabolites, and grazing on them harmed the worms. In this system, geosmin thus appears to indicate unpalatable bacteria, reducing predation and benefiting both predator and prey. Aposematic signals are well known in animals, and this work suggests that metabolites may play a similar role in the microbial world.