YiiP is a dimeric Zn(2+)/H(+) antiporter from Escherichia coli belonging to the cation diffusion facilitator family. We used cryoelectron microscopy to determine a 13-Å resolution structure of a YiiP homolog from Shewanella oneidensis within a lipid bilayer in the absence of Zn(2+). Starting from the X-ray structure in the presence of Zn(2+), we used molecular dynamics flexible fitting to build a model consistent with our map. Comparison of the structures suggests a conformational change that involves pivoting of a transmembrane, four-helix bundle (M1, M2, M4, and M5) relative to the M3-M6 helix pair. Although accessibility of transport sites in the X-ray model indicates that it represents an outward-facing state, our model is consistent with an inward-facing state, suggesting that the conformational change is relevant to the alternating access mechanism for transport. Molecular dynamics simulation of YiiP in a lipid environment was used to address the feasibility of this conformational change. Association of the C-terminal domains is the same in both states, and we speculate that this association is responsible for stabilizing the dimer that, in turn, may coordinate the rearrangement of the transmembrane helices.