Background:Elevated body mass index (BMI, kg m−2) has been consistently associated with oesophageal adenocarcinoma (EA) and gastric cardia adenocarcinoma (GCA) incidence. However, effects of adiposity over the life course in relation to EA/GCA have not been thoroughly explored.Methods:We pooled two prospective cohort studies: NIH-AARP Diet and Health Study and Prostate, Lung, Colorectal, and Ovarian (PLCO) Cancer Screening Trial, with data on 409 796 individuals (633 EA, 415 GCA). At baseline, participants reported their height and weight at ages 20 and 50 years, and current. Body mass index trajectories were determined using latent class analysis. Hazard ratios (HRs) and 95% confidence intervals (CI) were estimated using proportional hazards regression.Results:Compared with individuals with a BMI<25 kg m−2 at all time points, exceeding a BMI of 25 kg m−2 at age 20 was associated with increased risks of EA (HR=1.76, 95% CI: 1.35–2.29) and GCA (HR=1.62, 95% CI: 1.16–2.25). Similarly, a BMI trajectory of overweight (⩾25–<30 kg m−2) at age 20 progressing to obesity (⩾30 kg m−2) by age 50 was associated with increased risks of EA (HR=2.90, 95% CI: 1.67–5.04) and GCA (HR=4.07, 95% CI: 2.32–7.15), compared with individuals with a normal weight (⩾18.5–<25 kg m−2) trajectory. Weight gain of ⩾20 kg between age 20 and baseline was also associated with a two times increased risk of EA (HR=1.97, 95% CI: 1.43–2.73) and more modestly with GCA (HR=1.40, 95% CI: 0.96–2.05).Conclusions:Being overweight in early adulthood and weight gain later in life were each associated with increased risks of EA and GCA. This underscores the potential of weight control programs for reducing EA and GCA risk.