The prevalence and the cluster characteristics of risk factors of stroke were assessed in a Chinese diabetic population. Clinical data of 30 693 inpatients who were diagnosed with type 2 diabetes mellitus (T2DM) and admitted between 2013 and 2018 were retrospectively analyzed. The age-standardized prevalence of stroke was estimated using the 2010 Chinese population census data, and risk factors were analyzed by multiple imputation and regression. The crude and standardized prevalence rates of stroke in patients with T2DM were 34.4% and 21.5%, respectively, and 85.2% of the stroke patients had ischemic stroke. Nearly half of the patients who experienced stroke had clusters of more than 4 risk factors. Compared with no-risk-factor clustering, the risk of stroke significantly increased 3-4 times in the presence of more than 4 risk-factor clusters (P<0.001). Hypertension was the most common major risk factor for ischemic stroke [odds ratio (OR), 2.34; 95% confidence interval (CI), 2.18-2.50] and hemorrhagic stroke (OR, 3.68; 95% CI 2.95-4.59; P<0.001). Moreover, a 1-standard-deviation increase in fasting blood glucose (FBG) was significantly negatively correlated with ischemic stroke risk, and the same change in FBG was significantly associated with an 8% increased risk of hemorrhagic stroke. The prevalence of stroke in patients with T2DM is rather high, and the clustering of risk factors is associated with the development of stroke in T2DM patients. Risk factors differ in different stroke subtypes. Identifying risk factors for a specific high-risk group is necessary.