Background Adverse childhood experiences (ACEs) and dementia are associated and comorbid with obesity. However, according to emerging research, the role of obesity in the association between ACEs and dementia seems controversial.Aims This analysis aimed to explore the associations between ACEs and different dementia subtypes and the effect modification of long-term body mass index (BMI).Methods Data were obtained from the US Health and Retirement Study. Six ACEs were categorised as 0, 1 and 2 or more. All-cause dementia, Alzheimer’s disease (AD) and other dementias were defined by self-reported or proxy-reported physician diagnosis. Cox proportional hazards regression was used to explore the associations of ACEs with new-onset all-cause dementia, AD and other dementias from 2010 to 2020. Effect modification of BMI in 2010 and BMI transition and trajectory (fitted by group-based trajectory modelling) from 2004 to 2010 were assessed.Results 15 282 participants with a mean age of 67.0 years (58.0–75.0) were included in the 2010 data analysis. Significant interactions of ACEs with baseline BMI, BMI transition and BMI trajectory in their associations with new-onset all-cause dementia and AD were observed (all p