AIMS: To identify factors influencing hypoglycaemia in patients with type 2 diabetes mellitus (T2DM) undergoing colonoscopy and to construct a predictive model for assessing hypoglycaemia risk. DESIGN: A retrospective cohort study. METHODS: We retrospectively collected data on 598 T2DM patients who underwent colonoscopy and randomised them into a developmental cohort and a validation cohort in a 7:3 ratio. We used multivariate logistic regression to develop a predictive model for hypoglycaemia during colonoscopy and identify independent predictors in pre- and post-colonoscopy hypoglycaemia groups. RESULTS: We identified 112 of 598 (18.7%) T2DM patients who experienced hypoglycaemia during the peri-colonoscopy period: 43 pre-colonoscopy, 61 post-colonoscopy and 8 at both junctures. Ultimately, five predictors-insulin, SGLT2 inhibitors, fasting after colonoscopy, fasting C-peptide and estimated glomerular filtration rate (eGFR)-were integrated into the predictive model. The AUC for predicting hypoglycaemia was 0.78 (95% CI, 0.71-0.84) and 0.82 (95% CI, 0.74-0.90) in the development and validation cohort, respectively. Variables associated with pre-colonoscopy hypoglycaemia included SGLT2 inhibitors, fasting C-peptide and eGFR, whereas the post-colonoscopy hypoglycaemia group was associated with metformin, duration of diabetes, fasting C-peptide and fasting after the examination. CONCLUSION: This study successfully developed and validated a predictive model for assessing hypoglycaemia risk in T2DM patients during peri-colonoscopy. IMPLICATIONS FOR THE PROFESSION AND/OR PATIENT CARE: Early identification of patients at high risk for peri-colonoscopy hypoglycaemia allows nurses to implement personalised preventive strategies. The predictive model enables clinical nurses to deliver tailored interventions based on individual risk factors, potentially reducing hypoglycaemia-related complications and improving patient safety outcomes. IMPACT: This study provides nurses with a validated risk prediction tool for identifying high-risk type 2 diabetes patients during colonoscopy, enabling targeted blood glucose monitoring protocols and preventive interventions in clinical practice. REPORTING METHOD: This study follows the STROBE guidelines for reporting cohort studies. PATIENT OR PUBLIC CONTRIBUTION: Diabetes patients contributed electronic health record datasets.