Helicobacter pylori is one of the world's most successful human pathogens causing gastric ulcers and cancers. A key virulence factor of H. pylori is the Cag pathogenicity island, which encodes a type IV secretion system. HP0525 is an essential component of the Cag system and acts as an inner membrane associated ATPase. HP0525 forms double hexameric ring structures, with the C-terminal domains (CTDs) forming a closed ring and the N-terminal domains (NTDs) forming a dynamic, open ring. Here, the crystal structure of HP0525 in complex with a fragment of HP1451, a protein of previously unknown function, is reported. The HP1451 construct consists of two domains similar to nucleic acid-binding domains. Two HP1451 molecules bind to the HP0525 NTDs on opposite sides of the hexamer, locking it in the closed form and forming a partial lid over the HP0525 chamber. From the structure, it is suggested that HP1451 acts as an inhibitory factor of HP0525 to regulate Cag-mediated secretion, a suggestion confirmed by results of in vitro ATPase assay and in vivo pull-down experiments.