As a key mitochondrial Ca2+ transporter, NCLX regulates intracellular Ca2+ signalling and vital mitochondrial processes1–3. The importance of NCLX in cardiac and nervous-system physiology is reflected by acute heart failure and neurodegenerative disorders caused by its malfunction4–9. Despite substantial advances in the field, the transport mechanisms of NCLX remain unclear. Here we report the cryo-electron microscopy structures of NCLX, revealing its architecture, assembly, major conformational states and a previously undescribed mechanism for alternating access. Functional analyses further reveal an unexpected transport function of NCLX as a H+/Ca2+ exchanger, rather than as a Na+/Ca2+ exchanger as widely believed1. These findings provide critical insights into mitochondrial Ca2+ homeostasis and signalling, offering clues for developing therapies to treat diseases related to abnormal mitochondrial Ca2+.