Porphyry copper–molybdenum–gold deposits are the most important metal resources formed by hydrothermal processes associated with magmatism. It remains controversial, however, whether the metal content of porphyry-style and other magmatic–hydrothermal deposits is dominantly controlled by metal partitioning between magma and an exsolving magmatic fluid phase1,2 or by scavenging of metals from solid upper-crustal rocks by surface-derived fluids3. It also remains unknown to what degree the metal content in such deposits is affected by selective mineral precipitation from the ore fluid. Extremely saline fluids4, precipitating quartz and ore minerals in veins have been inferred to have a significant magma-derived component, on the basis of geological5, isotopic6,7 and experimental evidence8,9. Here we report gold and copper concentrations of single fluid inclusions in quartz, determined by laser-ablation inductively coupled plasma mass spectrometry. The results show that the Au/Cu ratio of primary high-temperature brines is identical to the bulk Au/Cu ratio in two of the world's largest copper–gold ore bodies. This indicates that the bulk metal budget of such deposits is primarily controlled by the composition of the incoming fluid, which is, in turn, likely to be controlled by the crystallization process in an underlying magma chamber.