Objective: This study examined the association between childhood conditions and cognitive function among middle-aged and older adults in China. Method: We analyzed data from the 2011 China Health and Retirement Longitudinal Study ( N = 11,868). Cognitive function was measured by word recall, a test of episodic memory. We examined the association between childhood conditions and cognitive function among the middle-aged (45-59 years) and the older (60 years and older) adults separately, using multilevel linear regressions. Results: Indicators of childhood socioeconomic status (SES) and nutrition were significantly associated with memory performance among the middle-aged and the older adults in China. Adulthood SES, education in particular, accounted for some but not all the associations. The protective effect of childhood urban residence was stronger for middle-aged women than for middle-aged men. Discussion: Childhood conditions are significantly associated with mid- to late-life cognitive function in China. The strengths of the associations may vary by gender and cohort.