FliG and FliM are switch proteins that regulate the rotation and switching of the flagellar motor. Several assembly models for FliG and FliM have recently been proposed; however, it remains unclear whether the assembly of the switch proteins is conserved among different bacterial species. We applied a combination of pull-down, thermodynamic and structural analyses to characterize the FliM–FliG association from the mesophilic bacterium Helicobacter pylori. FliM binds to FliG with micromolar binding affinity, and their interaction is mediated through the middle domain of FliG (FliGM), which contains the EHPQR motif. Crystal structures of the middle domain of H. pylori FliM (FliMM) and FliGM–FliMM complex revealed that FliG binding triggered a conformational change of the FliM α3-α1′ loop, especially Asp130 and Arg144. We furthermore showed that various highly conserved residues in this region are required for FliM–FliG complex formation. Although the FliM–FliG complex structure displayed a conserved binding mode when compared with Thermotoga maritima, variable residues were identified that may contribute to differential binding affinities across bacterial species. Comparison of the thermodynamic parameters of FliG–FliM interactions between H. pylori and Escherichia coli suggests that molecular basis and binding properties of FliM to FliG is likely different between these two species.