The serum level of iron in humans is tightly controlled by the action of the hormone hepcidin on the iron efflux transporter ferroportin. Hepcidin regulates iron absorption and recycling by inducing the internalization and degradation of ferroportin1. Aberrant ferroportin activity can lead to diseases of iron overload, such as haemochromatosis, or iron limitation anaemias2. Here we determine cryogenic electron microscopy structures of ferroportin in lipid nanodiscs, both in the apo state and in complex with hepcidin and the iron mimetic cobalt. These structures and accompanying molecular dynamics simulations identify two metal-binding sites within the N and C domains of ferroportin. Hepcidin binds ferroportin in an outward-open conformation and completely occludes the iron efflux pathway to inhibit transport. The carboxy terminus of hepcidin directly contacts the divalent metal in the ferroportin C domain. Hepcidin binding to ferroportin is coupled to iron binding, with an 80-fold increase in hepcidin affinity in the presence of iron. These results suggest a model for hepcidin regulation of ferroportin, in which only ferroportin molecules loaded with iron are targeted for degradation. More broadly, our structural and functional insights may enable more targeted manipulation of the hepcidin-ferroportin axis in disorders of iron homeostasis.