Microanalysis of major and trace elements in sulfide and silicate melt inclusions by laser-ablation inductively coupled plasma mass spectrometry indicates a direct link between a magmatic sulfide liquid and the composition of porphyry-type ore deposits. Copper (Cu), gold (Au), and iron (Fe) are first concentrated in a sulfide melt during magmatic evolution and then released to an ore-forming hydrothermal fluid exsolved late in the history of a magma chamber. The composition of sulfide liquids depends on the initial composition and source of the magma, but it also changes during the evolution of the magma in the crust. Magmatic sulfide melts may exert the dominant direct control on the economic metal ratios of porphyry-type ore deposits.