Hydrothermal fluids in orogenic and intrusion-related (mesothermal) gold deposits are dominated by saline-aqueous-carbonic fluids, commonly represented by the ternary system H2O-NaCl-CO2. The phase equilibria, thermodynamic properties (PVTx, density, compositions of fluid phases) and quartz dissolution-precipitation behavior in the H2O-NaCl-CO2 system, which are still poorly constrained, are of great importance to understanding the process of hydrothermal gold mineralization. Here, we conducted thermodynamic modeling to constrain the fluid properties under single- and two-phase conditions in the H2O-NaCl-CO2 system at temperatures of 300 to 500 °C and pressures of 0.001 to 3.5 kbar. Our results illustrate thermodynamic controls rooted in the equilibria of the H2O-NaCl-CO2 system. Increasing CO2 and/or NaCl contents shift the solvus to higher pressures and temperatures, expanding the pressure–temperature region of L + V immiscibility. Calculated isopleths of CO2 content in coexisting, immiscible vapor and liquid describe the maximum amount of CO2 that may be present in fluid inclusions through the studied P-T-x ranges. Quartz solubility in the H2O-NaCl-CO2 fluids shows strong dependence on temperature, pressure, and CO2 content, with several potential triggers for vein mineral deposition. Specifically, solubility of quartz generally decreases with decreasing temperature, pressure, and increasing CO2 content both in the single- and two-phase fluids, but exhibits retrograde behavior in the L + V field or at the phase-transition boundary. In detail, the dependence of quartz solubility on pressure is weak at low temperatures (300 °C), and becomes progressively stronger at high temperatures (400 °C and 500 °C), vice versa for temperature dependency at different pressures.The present study reviews two mechanisms of fluid immiscibility and constrain the conditions at which distinct fluid inclusion types, bedding-parallel shear veins and fault-related extension veins are formed in mesothermal gold deposits. Thermodynamic modeling of the solvus of the H2O-NaCl-CO2 system is consistent with the hypothesis that decompression is an efficient mechanism driving fluid immiscibility at specific ranges of temperature and composition, producing coexisting liquid- and vapor-phase fluids, both with low density and relatively low content of CO2. For fluids with high CO2 contents (>10 mol. %), cooling at relatively high pressure may also lead to fluid immiscibility, producing a liquid with low CO2 content in equilibrium with a vapor of medium to high CO2 content. Very CO2-rich, or “pure CO2” fluid inclusions (>90 mol. % CO2, type I) cannot be produced by immiscibility under these conditions, but may rather be the result of decrepitation of primary H2O-NaCl-CO2 fluid inclusions. Within the P-T-x ranges studied here, cooling-dominated phase separation accounts for the formation of fluid inclusions with moderate to high CO2 contents (50–80 mol. % CO2, type IIa). Fluid inclusions with low to moderate CO2 contents (5–30 mol. % CO2, type IIb) can represent the original ore-forming fluids, or can be produced by decompression-dominated phase separation. And H2O-NaCl fluid inclusions (type III) generally represent the latest-stage ore-forming fluids, or can be produced by decompression-induced immiscibility at high temperature. In orogenic (mesothermal) gold deposits, decompression-induced quartz precipitation during pressure fluctuation is dominant in bedding-parallel shear veins. Fault-related extension veins are associated with initial decompression-induced quartz precipitation and subsequent cooling-dominated deposition.