Charnockite is considered to be generated either through the dehydration of granitic magma by CO2 purging or by solid-state dehydration through CO2 metasomatism during granulite facies metamorphism. To understand the extent of dehydration, CO2 migration is quantitatively modeled in silicate melt and metasomatic fluid as a function of temperature, H2O wt%, pressure, basal CO2 flux and dynamic viscosity. Numerical simulations show that CO2 advection through porous and permeable high-grade metamorphic rocks can generate dehydrated patches close to the CO2 flow path, as illustrated by the occurrences of “incipient charnockites.” CO2 reaction-front velocity constrained by field observations is 0.69 km/m.y., a reasonable value, which matches well with other studies. On the other hand, temperature, rate of cooling, and basal CO2 flux are the critical parameters affecting CO2 diffusion through a silicate melt. CO2 diffusion through silicate melt can only occur at temperature greater than 840 °C and during slow cooling (≤3.7 × 10−5 °C/yr), features that are typical of magma emplacement in the lower crust. Stalling of CO2 fluxing at ∼840 °C explains why some deep-level plutons contain both hydrous and anhydrous (charnockitic) mineral assemblages. CO2 diffusion through silicate melt is virtually insensitive to pressure. Addition of CO2 basal flux facilitates episodic dehydrated melt migration by generating fracture pathways.