Childhood obesity is associated with alterations in hypothalamus–pituitary–adrenal (HPA) axis activity. However, it is unknown whether these alterations are a cause or a consequence of obesity. This study aimed to explore the temporal relationship between cortisol production and metabolism, and body mass index (BMI). This prospective follow-up study included 218 children (of whom 50% were male), born between 1995 and 1996, who were assessed at the ages of 9, 12 and 17 years. Morning urine samples were collected for assessment of cortisol metabolites by gas chromatography-tandem mass spectrometry, enabling the calculation of cortisol metabolite excretion rate and cortisol metabolic pathways. A cross-lagged regression model was used to determine whether BMI at various ages during childhood predicted later cortisol production and metabolism parameters, or vice versa. The cross-lagged regression coefficients showed that BMI positively predicted cortisol metabolite excretion (p = 0.03), and not vice versa (p = 0.33). In addition, BMI predicted the later balance of 11β-hydroxysteroid dehydrogenase (HSD) activities (p = 0.07), and not vice versa (p = 0.55). Finally, cytochrome P450 3A4 activity positively predicted later BMI (p = 0.01). Our study suggests that changes in BMI across the normal range predict alterations in HPA axis activity. Therefore, the alterations in HPA axis activity as observed in earlier studies among children with obesity may be a consequence rather than a cause of increased BMI.