Our results suggest an important role of microbiota-mediated AhR activation in the pathogenesis of endometritis and provide potential strategies for the intervention of infectious diseases and reproductive health by regulating the gut microbiota and metabolism. This evidence concerns the gene AHR and endometritis.