Sex ratio shifts in response to temperature are common in fish and reptiles. However, the mechanism linking temperature during early development and sex ratios has remained elusive. We show in the European sea bass (sb), a fish in which temperature effects on sex ratios are maximal before the gonads form, that juvenile males have double the DNA methylation levels of females in the promoter of gonadal aromatase (cyp19a), the enzyme that converts androgens into estrogens. Exposure to high temperature increased the cyp19a promoter methylation levels of females, indicating that induced-masculinization involves DNA methylation-mediated control of aromatase gene expression, with an observed inverse relationship between methylation levels and expression. Although different CpGs within the sb cyp19a promoter exhibited different sensitivity to temperature, we show that the increased methylation of the sb cyp19a promoter, which occurs in the gonads but not in the brain, is not a generalized effect of temperature. Importantly, these effects were also observed in sexually undifferentiated fish and were not altered by estrogen treatment. Thus, methylation of the sb cyp19a promoter is the cause of the lower expression of cyp19a in temperature-masculinized fish. In vitro, induced methylation of the sb cyp19a promoter suppressed the ability of SF-1 and Foxl2 to stimulate transcription. Finally, a CpG differentially methylated by temperature and adjacent to a Sox transcription factor binding site is conserved across species. Thus, DNA methylation of the aromatase promoter may be an essential component of the long-sought-after mechanism connecting environmental temperature and sex ratios in vertebrate species with temperature-dependent sex determination.