The links between obesity and cognition remain equivocal due to a variety of methodological limitations with current research, such as an overreliance on body mass index (BMI) as a measure of obesity, the use of cross-sectional designs, and inadequate specification over the domains of cognitive function to be examined. To address these issues, we used data from the Cognitive Project of the National Survey of Midlife Development in the United States, a large-scale, longitudinal dataset on non-institutionalized midlife adults (N = 2652), which enabled us to examine the long-term bidirectional relations between obesity and two latent factors of cognition—executive function and episodic memory—while controlling for potential confounds. Results showed that, over a span of nine years, an increase in obesity in Time 1 is associated with a decline in episodic memory in Time 2 (but not executive function), while an increase in executive function in Time 1 (but not episodic memory) is associated with a reduction in obesity in Time 2. These results were elucidated when obesity was indexed with waist-to-hip ratio but not with BMI. Our findings highlight important directions for further research, in particular the use of more valid obesity indices and a greater focus on the bidirectional effects between obesity and cognition.