This study analyzed China Health and Retirement Longitudinal Study data to explore the HbA1c-depression link, including depressive trajectories, while considering the mitigating impact of healthy lifestyles. Cross-lagged panel models and group-based trajectory modeling were performed to investigate the temporal relationship between HbA1c levels and depressive symptoms, as well as the depressive trajectories. Structural equation models were used to assess the mediating effects of healthy lifestyles. The mean age of the participants was 57.66 ± 9.04 years, with 53.68% being female. Analyzing 8826 participants across three waves, we observed a significant prediction of subsequent depressive symptoms by the preceding HbA1c levels (β = 0.296; p < 0.001). Four distinct trajectories of depressive symptoms were distinguished: stable low, stable moderate, increasing, and stable high. Elevated HbA1c levels were associated with a higher risk of developing stable high (OR 1.12 and 95% CI 1.02-1.23), increasing (OR 1.21 and 95% CI 1.11-1.32), and stable moderate depressive symptoms (OR 1.07 and 95% CI 1.01-1.13). Engaging in two healthy life behaviors reduced stable high and increasing depressive pattern risks by 32% and 30%, respectively. Adherence to a healthy lifestyle lessened 7.2% of the impact of high HbA1c levels on the subsequent depressive symptoms. These findings highlight the potential benefits of incorporating adequate sleep and light physical activities, which might reduce the adverse impact of elevated HbA1c levels on depressive symptoms.