Helicobacter pylori (H. pylori) is thought to primarily colonize the human stomach and lead to various gastrointestinal disorders, such as gastritis and gastric cancer. Currently, main eradication treatment is triple or quadruple therapy centered on antibiotics. Due to antibiotic resistance, the eradication rate of H. pylori is decreasing gradually. Therefore, searching for anti-H. pylori drugs from herbal sources has become a strategy for the treatment. Our team proposed a Hezi Qingyou Formula (HZQYF), composed of Chebulae Fructus, Ficus hirta Vahl and Cloves, and studied its anti-H. pylori activity and mechanism. Chemical components of HZQYF were studied using UHPLC-MS/MS and HPLC. Broth microdilution method and agar dilution method were used to evaluate HZQYF's antibacterial activity. The effects of HZQYF on expression of adhesion genes (alpA, alpB, babA), urease genes (ureE, ureF), and flagellar genes (flaA, flaB) were explored using Reverse Transcription-quantitative Polymerase Chain Reaction (RT-qPCR) technology. Effects on morphology and permeability of the extracellular membrane were studied using scanning electron microscopy (SEM) and N-phenylnaphthalen-1-amine (NPN) uptake. Effect on urease activity was studied using a urease kinetics analysis in vitro. Immunofluorescence staining method was used to examine the effect on adhesion. Western blot was used to examine the effect on cagA protein. Minimum inhibitory concentration (MIC) values of the formula against H. pylori clinical strains and standard strains were 80-160 μg/mL, and minimum bactericidal concentration (MBC) values were 160-320 μg/mL. The formula could down-regulate the expression of adhesion genes (alpA, alpB, babA), urease genes (ureE, ureF) and flagellar genes (flaA, flaB), change the morphology of H. pylori, increase its extracellular membrane permeability, and decrease its urease activity. Present studies confirmed that HZQYF had promising in vitro anti-H. pylori activities and demonstrated its possible mechanism of action by down-regulating the bacterial adhesion, urease, and flagellar gene expression, which provided scientific bases for further clinical investigations.