NarK belongs to the nitrate/nitrite porter (NNP) family in the major facilitator superfamily (MFS) and plays a central role in nitrate uptake across the membrane in diverse organisms, including archaea, bacteria, fungi and plants. Although previous studies provided insight into the overall structure and the substrate recognition of NarK, its molecular mechanism, including the driving force for nitrate transport, remained elusive. Here we demonstrate that NarK is a nitrate/nitrite antiporter, using an in vitro reconstituted system. Furthermore, we present the high-resolution crystal structures of NarK from Escherichia coli in the nitrate-bound occluded, nitrate-bound inward-open and apo inward-open states. The integrated structural, functional and computational analyses reveal the nitrate/nitrite antiport mechanism of NarK, in which substrate recognition is coupled to the transport cycle by the concomitant movement of the transmembrane helices and the key tyrosine and arginine residues in the substrate-binding site.