Carbonatite-related rare earth element (REE) deposits are a major source of global REE resources. Their common association with significant fluorite mineralization indicates that a fluorine-enriched geochemical environment is important for the formation of carbonatite-related REE mineralization. However, the specific geochemical behavior of fluorine, a crucial flux and mineralizer, in carbonatite-associated systems remains enigmatic. The Muluozhai deposit, located within the Mianning-Dechang REE metallogenic belt, western Sichuan, is a typical Cenozoic carbonatite-hosted REE deposit characterized by minimal post-ore modification and a well-preserved mineralization record. The H-O isotopic data and REE signatures reveal that purple fluorite was crystallized directly from a brine-melt, whereas green fluorite was precipitated during the subsequent hydrothermal stage following melt-fluid immiscibility. Our data record a continuous evolution of the fluorine-rich system from "brine-melt" to "late-stage hydrothermal fluids". Combined with multiple lines of evidence, including Ca-Sr-Nd isotopic and REE characteristics of fluorite, the results indicate that the REE mineralization is primarily associated with deep-sourced alkaline silicate-carbonatite magmatism, with the marble contributing a certain amount of calcium to the rare earth element mineralization. This study further demonstrates that the fluorine-rich nature of the parent magma promoted liquid immiscibility, leading to separation of silicate melt from carbonate-fluoride melt. During magmatic ascent and emplacement, the alkaline silicate melt crystalized first, whereas the carbonate-fluoride melt, owing to its high fluorine content, remained liquid at lower temperatures. Through continued fractional crystallization and enrichment processes, it evolved into a volatile-and REE-enriched brine-melt, which pervasively metasomatized the earlier-formed syenites. Subsequently, the brine-melt underwent separation and crystallization, forming calcite, purple fluorite, bastnäsite, and other minerals sequentially.