Background: Helicobacter pylori is a major cause of gastric diseases including gastric cancer. This study was aimed to explore whether hydrotalcite can inhibit H. pylori infection of gastric epithelial cells. Methods: the gastric epithelial cell line GES-1 and the gastric cancer cell line BGC823 were infected with H. pylori at multiplicities of infections (MOIs) of 50:1 and 100:1. Hydrotalcite was added to cell cultures. Cell apoptosis and cell cycle analysis were performed to measure the situation of cell growth. The main changes of cell ultrastructure were observed by transmission electron microscopy. H. pylori cell adhesion was observed by scanning electron microscopy. Results: hydrotalcite could significantly inhibit cell apoptosis of GES-1 and cell proliferation of BGC823 induced by H. pylori infection at an MOI of 50:1. Hydrotalcite treatment protected gastric cells from H. pylori infection, and H. pylori adhesion to gastric cells was reduced. However, hydrotalcite could not reverse damage induced by H. pylori infection at an MOI of 100:1. Conclusion: hydrotalcite can protect gastric cells from H. pylori infection when cell damage is not serious. It can weaken the damage of cells induced by H. pylori and decrease H. pylori adhesion to gastric cells.