Polycystic ovary syndrome (PCOS) is a common reproductive disorder associated with an adverse cardiometabolic profile early in life. Increasing evidence links cardiovascular risk factors, such as diabetes and hypertension, to accelerated cognitive aging. However, less is known about PCOS and its relationship to brain health, particularly at midlife. Our goal was to investigate possible associations between PCOS and midlife cognitive function and brain MRI findings in an ongoing prospective study. We used data from the Coronary Artery Risk Development in Young Adults (CARDIA) study, a geographically diverse prospective cohort study of individuals who were 18-30 years at baseline (1985-1986) and followed for 30 years. We identified women with PCOS from an ancillary study (CARDIA Women's study (CWS); n = 1,163) as those with elevated androgen levels and/or hirsutism in conjunction with symptoms of oligomenorrhea. At year 30, participants completed cognitive testing, including the Montreal Cognitive Assessment, Rey Auditory Verbal Learning Test (RAVLT) (verbal learning and memory), Digit Symbol Substitution Test (processing speed and executive function), Stroop test (attention and cognitive control), and category and letter fluency tests (semantics and attention). A subset completed brain MRI to assess brain structure and white matter integrity. Multivariable linear regression models estimated the association between PCOS and outcomes, adjusting for age, race, education, and study center. Of the 1163 women in CWS, 907 completed cognitive testing, and of these, 66 (7.1%) met criteria for PCOS (age 54.7 years). Women with and without PCOS were similar for age, BMI, smoking/drinking status, and income. At year 30, participants with PCOS performed lower (mean z score; 95% CI) on Stroop (-0.323 (-0.69 to -7.37); p = 0.008), RAVLT (-0.254 (-0.473 to -0.034); p = 0.002), and category fluency (-0.267 (-0.480 to -0.040); p = 0.02) tests. Of the 291 participants with MRI, 25 (8.5%) met PCOS criteria and demonstrated lower total white matter fractional anisotropy, a measure of white matter integrity (coefficient (95% CI) -0.013 (-0.021 to -0.005); p = 0.002), though not abnormal white matter. Our results suggest that women with PCOS have lower cognitive performance and lower white matter integrity at midlife. Additional research is needed to confirm these findings and to determine potential mechanistic pathways including potential modifiable factors.