In various animals, such as some fish, early exposure during development to environmental stressors, including high temperature, causes genetically female animals to develop male gonads. Although the process of sex reversal has been studied at a molecular level during gonad development, the role of the brain remains enigmatic. Now, Juan Fernandino and colleagues provide the first evidence that the central nervous system regulates environmental masculinisation in the medaka. They show that corticotropin-releasing hormone B (crhb) is upregulated in embryos incubated at high temperature during the period of gonadal sex determination. Using CRISPR/Cas9 to mutate the two genes encoding receptors for Crh, the authors show that mutating both crhr1 and crhr2 reduces female-to-male sex reversal at high temperatures. The process of masculinisation in these mutants can be rescued through the addition of cortisol, which acts downstream of Crh. Together, these data indicate that the hypothalamic-pituitary-interrenal axis is functional during the period of gonadal fate specification and contributes to environmental sex determination. This work challenges previous assumptions that sexual fate begins in the gonad, and reveals an important mechanism for sex reversal in response to increased temperatures.