The hypothalamic-pituitary-adrenal (HPA) axis has been implicated in the pathophysiology of a variety of mood and cognitive disorders. Neuroendocrine studies have demonstrated HPA axis overactivity in major depression, a relationship of HPA axis activity to cognitive performance and a potential role of HPA axis genetic variation in cognition. The present study investigated the simultaneous roles HPA axis activity, clinical symptomatology and HPA genetic variation play in cognitive performance. Patients with major depression with psychotic major depression (PMD) and with nonpsychotic major depression (NPMD) and healthy controls (HC) were studied. All participants underwent a diagnostic interview and psychiatric ratings, a comprehensive neuropsychological battery, overnight hourly blood sampling for cortisol and genetic assessment. Cognitive performance differed as a function of depression subtype. Across all subjects, cognitive performance was negatively correlated with higher cortisol, and PMD patients had higher cortisol than did NPMDs and HCs. Cortisol, clinical symptoms and variation in genes, NR3C1 (glucocorticoid receptor; GR) and NR3C2 (mineralocorticoid receptor; MR) that encode for GRs and MRs, predicted cognitive performance. Beyond the effects of cortisol, demographics and clinical symptoms, NR3C1 variation predicted attention and working memory, whereas NR3C2 polymorphisms predicted memory performance. These findings parallel the distribution of GR and MR in primate brain and their putative roles in specific cognitive tasks. HPA axis genetic variation and activity were important predictors of cognition across the entire sample of depressed subjects and HR. GR and MR genetic variation predicted unique cognitive functions, beyond the influence of cortisol and clinical symptoms. GR genetic variation was implicated in attention and working memory, whereas MR was implicated in verbal memory.