Whole rock geochemistry combined with spatially resolved geochemistry of zircon, apatite, biotite and plagioclase allows us to uncover the magmatic processes leading to ore formation at the Muguayuan deposit. The Sanxianba granite, associated with the Muguayuan veinlet-disseminated scheelite deposit, is located in the middle of the Jiangnan Orogen. Whole rock Sr and Nd isotopes, and zircon Lu-Hf isotopes suggest it might originate from the Neoproterozoic Banxi group strata. The Rb element modeling shows that, after ~35% of partial melting, the Banxi group metasandstone can generate the primary Sanxianba melt with 164 ppm Rb and 21 ppm W. The intra-/intercrystal texture and compositions of zircon and plagioclase indicate that W and other elements such as HREE, Th, U, Nb, Ta, and P increase in the melt during fractional crystallization. The water content in the early Sanxianba magma, calculated through the plagioclase-hydrometer, is ~4.4 wt%, and its enrichment in the melt is reflected by the increasing water content in biotite with fractionation. F content in the early apatite is relatively high and invariable but further elevated in the late apatite. Chlorine, LREE and Na contents in the early apatite also present an enrichment trend. When H2O and Cl start to be saturated with the magma fractionation in the deep magma chamber, Cl-, Na-, and LREE-rich but W-poor fluid exsolves from the melt, resulting in the albitization and chloritization of feldspar and biotite phenocrysts, respectively. The subsequent decrease of Cl, Na2O and La2O3 in the late apatite record this first fluid exsolution. Fluorine, P, H2O and W continue to enrich in the evolved melt with fractionation after the Cl-rich fluid exsolution. These fluxing components reach oversaturation during the shallow-ward emplacement of the magma, forming the F-, P- and W-rich fluids. The apex of the intrusion cools and forms a solid barrier, which prevents the escape of fluids. The exsolved fluids from the underlying magma continuously supply upward and react with the apex along fractures, resulting in greisenization and phyllic alteration. During alteration, Ca is released from calcium-rich plagioclase and combines with tungsten in the fluids to form scheelite mineralization. Magma evolution leading to the tungsten mineralization may be also the general scenarios in the other granite-related veinlet-disseminated scheelite deposits.