The distribution of obesity tends to shift from rich to poor individuals as countries develop, in a process of shifting sociodemographic patterns of obesity that has been called the ‘obesity transition’. This change tends to happen with economic development, but little is known about the specific mechanisms that drive the change. We propose that improvements in childhood circumstances with economic development may be one of the drivers of the obesity transition. We explore whether the social gradient in body weight differs by childhood socioeconomic status (SES), proxied by the respondent’s mother having Grade 12, using South Africa’s nationally representative panel National Income Dynamics Study. In support of our hypothesis, we find that the social gradient in body weight is less positive for adults who had a high childhood SES, and already appears to have reversed among high-SES women who also had a high childhood SES. Upward social mobility over an individual’s life course or across a single generation is associated with higher body weight compared to a stable high SES. But a high SES sustained in childhood and adulthood – or across more than one generation – may decrease adult obesity risk, and result in a reversal of the social gradient in body weight. Random effects within-between models show that the social gradient in body weight and its interaction with childhood SES are driven more by differences in income between individuals than by short-run changes in income within individuals, again suggesting that the obesity transition is driven by long-run changes rather than by very short-run changes. Our results are broadly robust to using several alternative measures of body weight, childhood SES and adult SES. Our results are consistent with the hypothesis that widespread improvements in childhood circumstances and nutrition with economic development may contribute to the shift to later stages of the obesity transition.Copyright © 2023 The Authors. Published by Elsevier B.V. All rights reserved.