Background Persistent endometritis caused by bacterial infections has lethal effects on the reproductive performance of dairy cattle, which compromises animal welfare and delays or prevents pregnancy. The microRNA (miRNA) miR-34 family plays a pivotal role in the inflammatory process; however, the precise mechanism of miR-34a in endometritis has not been thoroughly elucidated to date. Methods In this study, the endometrium of cows diagnosed with endometritis was harvested for bacterial culture and Gram staining to evaluate bacterial contamination of the uterus. Based on this, a bovine endometrial epithelial cell (BEND) inflammation model and a mouse model stimulated with lipopolysaccharide (LPS) in vitro and in vivo were constructed. Cell viability was assessed by CCK-8, trypan blue staining, and flow cytometry. H&E was applied to histopathological analysis. Immunohistochemical, immunofluorescence, qRT-PCR, and western blot assays were performed to measure the mRNA and protein expression of relevant genes. Online databases, plasmid construction, and dual-luciferase reporter gene assays were used to predict and validate the interaction between miR-34a and its target gene LGR4. Finally, mice were injected vaginally with a local antagomir to validate the role of miR-34a in murine uterine inflammation. Results In this study, we observed that Gram-negative bacteria, represented by Escherichia coli, are the predominant pathogenic agents responsible for the recurrent occurrence of endometritis in dairy cows. Further, miR-34a was found to repress the expression of LGR4 by targeting the 3′ untranslated region (3′UTR) of LGR4. miR-34a was upregulated in bovine uterine tissues and bovine endometrial epithelial cells stimulated with LPS. miR-34a induced the release of the proinflammatory cytokines IL-1β, IL-6, and TNF-α by activating the phosphorylation of NF-κB p65. Furthermore, IL-1β upregulated miR-34a transcription and downregulated LGR4 expression in an IL-1β-dependent manner. Conclusions Taken together, our study confirmed that miR-34a is regulated by IL-1β and suppresses the level of the LGR4 3′UTR, which in turn exacerbates the inflammatory response. Thus, the knockdown of miR-34a might be a new direction for the treatment of endometritis.