The concentration and redistribution of ore components from a primary melt to hydrothermal fluids are important for understanding ore formation. The Mushgai-Khudag complex is a typical example of an intrusion where hydrothermal processes are widespread and where we can observe the redistribution of ore components during hydrothermal processes. In this study, we use mineralogical, melt and fluid inclusion data to trace element characteristics of apatite from the Mushgai-Khudag complex to reconstruct the formation of the magnetite-apatite rocks and their magmatic-hydrothermal evolution and to clarify the origin of the REE mineralization. We conclude that the magnetite-apatite rocks crystallized from salt melt with a high content of phosphate and sulfate components at a temperature of approximately 830–850 °C. The origin of magnetite-apatite rocks probably can be explained by the silicate-salt immiscibility that occurred at the alkaline syenite crystallization stage. Further evolution of the salt melt to the brine of the carbonate-(fluoride)-chloride-sulfate composition was accompanied by the barite, celestite and monazite-Ce formation at the temperature of approximately 500–580 °C. The dissolution of apatite and the crystallization of gypsum, phosphosiderite and monazite-Ce pseudomorphs after apatite took place at the hydrothermal stage after a reaction with a fluid that evolved from carbonate-chloride-sulfate (at 250–350 °C) into a predominantly chloride composition (at 150–250 °C). The high activity of the sulfate component and a significant enrichment of the rocks in REE also occurred at the late hydrothermal stage.