The triose-phosphate/phosphate translocator (TPT) catalyses the strict 1:1 exchange of triose-phosphate, 3-phosphoglycerate and inorganic phosphate across the chloroplast envelope, and plays crucial roles in photosynthesis. Despite rigorous study for more than 40 years, the molecular mechanism of TPT is poorly understood because of the lack of structural information. Here we report crystal structures of TPT bound to two different substrates, 3-phosphoglycerate and inorganic phosphate, in occluded conformations. The structures reveal that TPT adopts a 10-transmembrane drug/metabolite transporter fold. Both substrates are bound within the same central pocket, where conserved lysine, arginine and tyrosine residues recognize the shared phosphate group. A structural comparison with the outward-open conformation of the bacterial drug/metabolite transporter suggests a rocker-switch motion of helix bundles, and molecular dynamics simulations support a model in which this rocker-switch motion is tightly coupled to the substrate binding, to ensure strict 1:1 exchange. These results reveal the unique mechanism of sugar phosphate/phosphate exchange by TPT.