ImportanceSex differences are established in associations between apolipoprotein E (APOE) ε4 and cognitive impairment in Alzheimer disease (AD). However, it is unclear whether sex-specific cognitive consequences of APOE are consistent across races and extend to the APOE ε2 allele.ObjectiveTo investigate whether sex and race modify APOE ε4 and ε2 associations with cognition.Design, Setting, and ParticipantsThis genetic association study included longitudinal cognitive data from 4 AD and cognitive aging cohorts. Participants were older than 60 years and self-identified as non-Hispanic White or non-Hispanic Black (hereafter, White and Black). Data were previously collected across multiple US locations from 1994 to 2018. Secondary analyses began December 2021 and ended September 2022.Main Outcomes and MeasuresHarmonized composite scores for memory, executive function, and language were generated using psychometric approaches. Linear regression assessed interactions between APOE ε4 or APOE ε2 and sex on baseline cognitive scores, while linear mixed-effect models assessed interactions on cognitive trajectories. The intersectional effect of race was modeled using an APOE × sex × race interaction term, assessing whether APOE × sex interactions differed by race. Models were adjusted for age at baseline and corrected for multiple comparisons.ResultsOf 32 427 participants who met inclusion criteria, there were 19 007 females (59%), 4453 Black individuals (14%), and 27 974 White individuals (86%); the mean (SD) age at baseline was 74 years (7.9). At baseline, 6048 individuals (19%) had AD, 4398 (14%) were APOE ε2 carriers, and 12 538 (38%) were APOE ε4 carriers. Participants missing APOE status were excluded (n = 9266). For APOE ε4, a robust sex interaction was observed on baseline memory (β = −0.071, SE = 0.014; P = 9.6 × 10−7), whereby the APOE ε4 negative effect was stronger in females compared with males and did not significantly differ among races. Contrastingly, despite the large sample size, no APOE ε2 × sex interactions on cognition were observed among all participants. When testing for intersectional effects of sex, APOE ε2, and race, an interaction was revealed on baseline executive function among individuals who were cognitively unimpaired (β = −0.165, SE = 0.066; P = .01), whereby the APOE ε2 protective effect was female-specific among White individuals but male-specific among Black individuals.Conclusions and RelevanceIn this study, while race did not modify sex differences in APOE ε4, the APOE ε2 protective effect could vary by race and sex. Although female sex enhanced ε4-associated risk, there was no comparable sex difference in ε2, suggesting biological pathways underlying ε4-associated risk are distinct from ε2 and likely intersect with age-related changes in sex biology.