Phase relations in the Fe-Fe3C-Fe3N system are studied in high-pressure experiments at 7.8 GPa and 1350 °C using a split-sphere multi-anvil apparatus. The starting mixtures consisting of Fe, Fe3C and Fe3N are loaded into ceramic or graphite capsules. Contamination with trace amounts of oxygen leads to the appearance of wüstite in the system retaining oxygen fugacity (fO2) near the iron-wüstite (IW) buffer. The metal melt rich in carbon and nitrogen has a large stability field in the central part of the phase diagram, and this field at 1350 °C is tangent to the Fe-Fe3C side of the Fe-Fe3C-Fe3N triangle at the point of the Fe-Fe3C eutectics. Iron nitride ε-Fe3N (space group P6322 or P63/mmc) contains variable amounts of C and N: up to 2.0–2.5 wt% C and 6.0–7.3 wt% N in equilibrium with a C- and N-rich melt and as little as 1.0 wt% C and 3.2 wt% N in equilibrium with γ- Fe. The limit C and N contents in γ-Fe equilibrated with the C- and N-rich melt is about 1.0 wt%, while the N solubility in cementite (Fe3C) does not exceed 0.5 wt%. The obtained data make basis for the isothermal section of the Fe-Fe3C-Fe3N system. The metal melt phase is inferred to be the main host of carbon and nitrogen in the Fe0-saturated (0.1 wt%) mantle at a depth of ∼250 km. In particular, C- and N-bearing austenite (γ-Fe) and metal melts host carbon and nitrogen in the mantle depleted in volatiles (20 ppm C and 1 ppm N), whereas carbon and nitrogen in the mantle with high concentrations of volatiles (250 ppm C and 100 ppm N) reside in C- and N-rich melts with a minor amount of iron carbide (Fe3C). The presence of nickel and sulphur in metal are expected to inhibit the formation of iron carbide and increases the melt phase stability. Redox freezing of N-rich carbonate melts from subduction slabs in Fe0-saturated mantle may produce iron melts supersaturated with nitrogen and stable ε-Fe3N.