To examine the associations between fasting blood glucose (FBG) trajectories, the changes in FBG over time and the risk of cancer, particularly for gastrointestinal cancer, we enrolled 69,742 participants without diabetes from the Kailuan cohort. FBG trajectories (2006–2010) were modeled by group-based trajectory modeling, and five trajectories were identified: low-increasing (n = 6,275), moderate-stable (n = 44,120), moderate-increasing (n = 10,149), elevated-decreasing (n = 5,244) and elevated-stable (n = 3,954). A total of 1,364 cancer cases were accumulated between 2010 and 2015, including 472 gastrointestinal cancer cases. We used Cox proportional hazards regression models to evaluate the associations between FBG trajectory patterns and the risk of cancer. We further assessed the associations while carefully controlling for initial body mass index (BMI) in 2006 and for changes in BMI during 2006–2010. Relative to the moderate-stable group, we found a higher hazard ratio (HR) for overall cancer in the low-increasing group (HR = 1.26, 95% confidence interval (CI) 1.06–1.50); and for gastrointestinal cancer in the elevated-stable group (HR = 1.66, 95% CI 1.22–2.26). Moreover, among participants with an initial BMI ≥25 kg/m2, a positive association with the low-increasing group was observed for both overall cancer and gastrointestinal cancer (HR = 1.54, 95% CI 1.17–2.04; HR = 1.65, 95% CI 1.02–2.66; respectively); among participants with a stable BMI (4.40% loss–5.15% gain), a positive association with the elevated-stable group was observed both for overall cancer and gastrointestinal cancer (HR = 1.43, 95% CI 1.10–1.87; HR = 1.95, 95% CI 1.33–2.86; respectively). Our study observed that FBG trajectories were associated with cancer risk among participants without diabetes, and BMI may modify the associations.