The Ulu Sokor gold deposit is one of the most famous and largest gold deposits in Malaysia and is located in the Central Gold Belt. This deposit consists of three major orebodies that are related to NS- and NE-striking fractures within fault zones in Permian-Triassic meta-sedimentary and volcanic rocks of the East Malaya Block. The faulting events represent different episodes that are related to each orebody and are correlated well with the mineralogy and paragenesis. The gold mineralization consists of quartz-dominant vein systems with sulfides and carbonates. The hydrothermal alteration and mineralization occurred during three stages that were characterized by (I) silicification and brecciation; (II) carbonatization, sericitization, and chloritization; and (III) quartz–carbonate veins.Fluid inclusions in the hydrothermal quartz and calcite of the three stages were studied. The primary CO2–CH4–H2O–NaCl fluid inclusions in stage I are mostly related to gold mineralization and display homogenization temperatures of 269–389°C, salinities of 2.77–11.89wt.% NaCl equivalent, variable CO2 contents (typically 5–29mol%), and up to 15mol% CH4. In stage II, gold was deposited at 235–398°C from a CO2±CH4–H2O–NaCl fluid with a salinity of 0.83–9.28wt.% NaCl equivalent, variable CO2 contents (typically 5–63mol%), and up to 4mol% CH4. The δ18OH2O and δD values of the ore-forming fluids from the stage II quartz veins are 4.5 to 4.8‰ and −44 to −42‰, respectively, and indicate a metamorphic–hydrothermal origin. Oxygen fugacities calculated for the entire range of T-P-XCO2 conditions yielded log fO2 values between −28.95 and −36.73 for stage I and between −28.32 and −39.18 for stage II. These values indicate reduced conditions for these fluids, which are consistent with the mineral paragenesis, fluid inclusion compositions, and isotope values.The presence of daughter mineral-bearing aqueous inclusions is interpreted to be a magmatic signature of stage IIIa. Combined with the oxygen and hydrogen isotopic compositions (δ18OH2O=6.8 to 11.9‰, δD=−77 to −62‰), these inclusions indicate that the initial fluid was likely derived from a magmatic source. In stage IIIb, the gold was deposited at 263° to 347°C from a CO2–CH4–H2O–NaCl fluid with a salinity of 5.33 to 11.05wt.% NaCl equivalent, variable CO2 contents (typically 9–15mol%), and little CH4. The oxygen and hydrogen isotopic compositions of this fluid (δ18OH2O=8.1 to 8.8‰, δD=−44 to −32‰) indicate that it was mainly derived from a metamorphic–hydrothermal source. The CO2–H2O±CH4–NaCl fluids that were responsible for gold deposition in the stage IIIc veins had a wide range of temperatures (214–483°C), salinities of 1.02 to 21.34wt.% NaCl equivalent, variable CO2 contents (typically 4–53mol%), and up to 7mol% CH4. The oxygen and hydrogen isotopic compositions (δ18OH2O=8.5 to 9.8‰, δD=−70 to −58‰) were probably acquired at the site of deposition by mixing of the metamorphic–hydrothermal fluid with deep-seated magmatic water and then evolved by degassing at the site of deposition during mineralization. The log fO2 values from −28.26 to −35.51 also indicate reduced conditions for this fluid in stage IIIc. Moreover, this fluid had a near-neutral pH and δ34S values of H2S of −2.32 to 0.83‰, which may reflect the derivation of sulfur from the subducted oceanic lithospheric materials.The three orebodies represent different gold transportation and precipitation models, and the conditions of ore formation are related to distinct events of hydrothermal alteration and gold mineralization. The gold mineralization of the Ulu Sokor deposit occurred in response to complex and concurrent processes involving fluid immiscibility, fluid–rock reactions, and fluid mixing. However, fluid immiscibility was the most important mechanism for gold deposition and occurred in these orebodies, which have corresponding fluid properties, structural controls, geologic characteristics, tectonic settings, and origins of the ore-forming matter. These characteristics of the Ulu Sokor deposit are consistent with its classification as an orogenic gold deposit, while some of the veins are genetically related to intrusions.