Helicobacter pylori is a gastric pathogen that colonizes approximately 50% of the world's population. Infection with H. pylori causes chronic inflammation and significantly increases the risk of developing duodenal and gastric ulcer disease and gastric cancer. In the present study, we found that phenyl lactic acid (PLA) derived from Lactobacillus plantarum ZJ316 (L. plantarum ZJ316) can directly inhibit the growth and urease activity of H. pylori in vitro with a minimum inhibitory concentration (MIC) of 2.5 mg mL-1. Moreover, PLA also caused a dramatic morphological transformation from a spiral to a coccoid form in H. pylori. In this work, we also analyzed the beneficial effects of PLA in mice. The results showed that PLA administration ameliorated H. pylori-induced gastric mucosal damage and significantly decreased lymphocyte infiltration and inflammatory cytokines, including interleukin-1β (IL-1β), interleukin 6 (IL-6), and interferon-γ (IFN-γ) by 59.93%, 63.95%, and 48.05%, respectively, but elevated the interleukin-10 (IL-10) and glutathione (GSH) levels. Furthermore, PLA administration improved microbiota diversity with increased Bacteroidetes abundance and decreased Proteobacteria abundance by 46.39% and 24.05%, respectively. PLA also significantly reduced the abundance of H. pylori but increased the relative abundances of potential beneficial bacteria, such as Faecalibacterium, Bifidobacterium, and Lactobacillus. These results demonstrated that PLA can ameliorate H. pylori-induced inflammation and support beneficial gut bacteria, providing a new perspective against H. pylori infection.