The Gram-negative pathogen Salmonella enterica harbours a periplasmic D-Ala-D-Ala dipeptidase (termed PcgL), which confers the ability to grow on D-Ala-D-Ala as sole carbon source. We now demonstrate that inactivation of the pcgL gene renders Salmonella hypervirulent. This phenotype results from the accumulation of peptidoglycan-derived D-Ala-D-Ala in the pcgL mutant and not from an intrinsically faster growth rate. Synthetic D-Ala-D-Ala (but not L-Ala-L-Ala or D-Ala) increased the number of wild-type Salmonella in the liver and spleen of mice within 24 h of injection, suggesting that D-Ala-D-Ala interferes with some aspect of innate immunity. However, the pcgL mutant was unable to grow on D-Ala-D-Ala as sole carbon source and was defective for survival in nutrient-poor conditions. We identified clinical isolates lacking D-Ala-D-Ala dipeptidase activity and unable to grow on D-Ala-D-Ala because of inactivation of the pcgL gene. Our data suggest that genes (such as pcgL) that, when mutated make pathogens more virulent, may be retained because their contribution to pathogen fitness in non-host environments outweighs potential advantages of the hypervirulent variant in the infected host.