Our results demonstrate that microbiota-mediated AhR activation is a key factor in fighting pathogen-caused inflammation, which leads to a potential strategy to regulate the gut microbiota and metabolism by dietary Trp or probiotics for the intervention of infectious diseases and reproductive health. Here, AHR is linked to infectious disease.