Food-borne hemorrhagic Escherichia coli, exemplified by the strains O157:H7 and O104:H4 (refs 1, 2), require elaborate acid-resistance systems (ARs) to survive the extremely acidic environment such as the stomach (pH ≈ 2). AR2 expels intracellular protons through the decarboxylation of L-glutamate (Glu) in the cytoplasm and exchange of the reaction product γ-aminobutyric acid (GABA) with extracellular Glu. The latter process is mediated by the Glu-GABA antiporter GadC, a representative member of the amino-acid-polyamine-organocation superfamily of membrane transporters. The functional mechanism of GadC remains largely unknown. Here we show, with the use of an in vitro proteoliposome-based assay, that GadC transports GABA/Glu only under acidic conditions, with no detectable activity at pH values higher than 6.5. We determined the crystal structure of E. coli GadC at 3.1 Å resolution under basic conditions. GadC, comprising 12 transmembrane segments (TMs), exists in a closed state, with its carboxy-terminal domain serving as a plug to block an otherwise inward-open conformation. Structural and biochemical analyses reveal the essential transport residues, identify the transport path and suggest a conserved transport mechanism involving the rigid-body rotation of a helical bundle for GadC and other amino acid antiporters.