One of the major and essential classes of transmembrane (TM) receptors, present in all domains of life, is sensor histidine kinases, parts of two-component signaling systems (TCSs). The structural mechanisms of TM signaling by these sensors are poorly understood. We present crystal structures of the periplasmic sensor domain, the TM domain, and the cytoplasmic HAMP domain of the Escherichia coli nitrate/nitrite sensor histidine kinase NarQ in the ligand-bound and mutated ligand-free states. The structures reveal that the ligand binding induces rearrangements and pistonlike shifts of TM helices. The HAMP domain protomers undergo leverlike motions and convert these pistonlike motions into helical rotations. Our findings provide the structural framework for complete understanding of TM TCS signaling and for development of antimicrobial treatments targeting TCSs.