The prefrontal cortex (PFC) is exquisitely sensitive to its neurochemical environment. Minor fluctuations in cortical dopamine (DA) can profoundly alter working memory, a PFC-dependent cognitive function that supports an array of essential human behaviors. Dopamine’s action in the PFC follows an inverted U-shaped curve, where an optimal DA level results in maximal function and insufficient or excessive DA impairs PFC function. In animals, 17β-estradiol (the major estrogen in most mammals, referred to henceforth as estradiol) has been shown to enhance DA activity, yet no human study has adequately addressed whether estradiol’s impact on cognition occurs by way of modulating specific neurochemical systems. Here we examined the effects of endogenous fluctuations in estradiol on working memory in healthy young women as a function of baseline PFC DA [indexed by catechol-O-methyltransferase (COMT) Val(158)Met genotype and, at a finer scale, COMT enzyme activity]. The results demonstrate that estradiol status impacts working memory function and, crucially, the direction of the effect depends on indices of baseline DA. Moreover, consistent with a DA cortical efficiency hypothesis, functional MRI revealed that inferred optimal DA was associated with reduced PFC activity sustained across task blocks and selectively enhanced PFC activity on trials with the greatest demand for cognitive control. The magnitude of PFC activity during high control trials was predictive of an individual’s performance. These findings show that although estrogen, considered in isolation, may have unpredictable effects on cognitive performance, its influence is clarified when considered within a larger neuromodulatory framework. Given the clinical prevalence of dopaminergic drugs, understanding the relationship between estrogen and DA is essential for advancing women’s health.