Previous studies provided clues that environmental factors were closely related to diabetes incidence. However, the evidence from high-quality and large cohort studies about the effects of PM2.5, solid fuel use and greenness on the development of diabetes among middle-aged and older adults in China was scarce. To separately investigate the independent effects of PM2.5, solid fuel use and greenness on the development of diabetes among middle-aged and older adults. A total of 9242 participants were involved in this study extracted from the China Health and Retirement Longitudinal Study. Time-varying Cox regression was applied to detect the association of diabetes with PM2.5, solid fuel use and greenness, separately. The potential interactive effect of air pollution and greenness were explored using the relative excess risk due to interaction (RERI). Per 10 μg/m3 increases in PM2.5 were associated with 6.0% (95% CI: 1.9, 10.2) increasing risks of diabetes incidence. Females seemed to be more susceptible to PM2.5. However, the effects of solid fuel use only existed in older and lower BMI populations, with hazard ratios (HRs) of 1.404 (1.116, 1.766) and 1.346 (1.057, 1.715), respectively. In addition, exposure to high-level greenness might reduce the risks of developing diabetes [HR = 0.801 (0.687, 0.934)]. Weak evidence of the interaction effect of PM2.5/solid fuel use and greenness on diabetes was found. Both PM2.5 and solid fuel use were associated with the increasing incidence of diabetes. In addition, high-level greenness might be a beneficial environmental factor for reducing the risks of developing diabetes. All in all, our findings might provide valuable references for public health apartments to formulate very fruitful policies to reduce the burden of diabetes. Both PM2.5 and solid fuel use were associated with the increasing incidence of diabetes while high-level greenness was not, which might provide valuable references for public health apartments to make policies.