Introduction: The prevalence of obesity is rising. Most previous studies that examined the relationship between body mass index (BMI) and physical activity measured BMI at a single time-point, ignoring the time-varying nature of BMI. The relationship between BMI trajectories and habitual physical activity in community settings remains unclear. Objective: To assess the relationship between BMI trajectories and habitual physical activity measured by daily steps from a smartwatch, among participants enrolled in the electronic Framingham Heart Study (eFHS). We hypothesized that participants whose BMI trajectories increased over a 14-year period prior to the step assessment take fewer daily steps, compared to participants who maintained stable BMI trajectories during the same time period. Methods: We used a semiparametric group-based modelling method to identify BMI trajectory patterns. Participants who attended exams 1, 2, and 3 were included in building the trajectories. Daily steps were recorded from the smartwatch provided at exam 3 with “active days” defined as days with ≥ 5watch wear-hours. We excluded participants with <30 active days. The median follow-up period for step count was 357 days (IQR: 467 days). We used generalized linear models that accounted for correlation between daily steps in the same individuals to examine the longitudinal relationship between BMI trajectory groups and daily step counts, adjusting for relevant covariates. Results: We identified three trajectory groups for the 837 eFHS participants. Group 1 included 292 participants (mean age 54 years, 57% women) whose BMI was stable (slope: 0.005, p=0.75); Group 2 included 468 participants (mean age 53 years, 56% women) whose BMI increased slightly (slope: 0.123, p<9.2e-17); and Group 3 included 77 participants (mean age 50 years, 70% women) who had the largest increase of BMI (slope: 0.318, p=2.8e-22).Adjusting for age, sex, wear time and race/ethnicity, participants in group 3 (Δ1437 steps P< 0.0001) and Group 2 (Δ422 steps, P=0.04) took significantly fewer steps, compared to participants in Group 1 (Model 1). The effect sizes were slightly attenuated but remained significant after additionally adjusting for hypertension, type 2 diabetes, current smoking, and cardiovascular disease: Group 3 took 1258 fewer steps, P=0.0001; Group 2 took 406 fewer steps, P=0.04 (Model 2). We further adjusted for sleep apnea, education, and marital status in Model 3 and observed that on average Group 3 took 1120 fewer steps (P= 0.0007) and Group 2 took 382 fewer steps (P= 0.06), compared to Group 1. Conclusion: Participants whose BMI trajectory increased over time took significantly fewer steps compared to participants with more stable BMI trajectories. Our findings suggest that levels of physical activity may correlate with greater weight gain during adulthood.