OmpG, a monomeric pore-forming protein from Escherichia coli outer membranes, was refolded from inclusion bodies and crystallized in two different conformations. The OmpG channel is a 14-stranded β-barrel, with short periplasmic turns and seven extracellular loops. Crystals grown at neutral pH show the channel in the open state at 2.3 Å resolution. In the 2.7 Å structure of crystals grown at pH 5.6, the pore is blocked by loop 6, which folds across the channel. The rearrangement of loop 6 appears to be triggered by a pair of histidine residues, which repel one another at acidic pH, resulting in the breakage of neighbouring H-bonds and a lengthening of loop 6 from 10 to 17 residues. A total of 151 ordered LDAO detergent molecules were found in the 2.3 Å structure, mostly on the hydrophobic outer surface of OmpG, mimicking the outer membrane lipid bilayer, with three LDAO molecules in the open pore. In the 2.7 Å structure, OmpG binds one OG and one glucose molecule as sugar substrates in the closed pore.