In this study, we revealed that AhR was involved in the pathogenesis of E. coli-induced mastitis and that treating with Ficz ameliorated E. coli-induced mastitis in association with inhibiting inflammation and repairing the barrier function by activating AhR. Here, AHR is linked to mastitis.