Objective To explore the relationships between carotid artery and cardiac ultrasonography indexes and risk of cardiovascular and cerebrovascular diseases in patients with type 2 diabetes mellitus (T2DM). Methods The clinical data of 180 T2DM patients who were examined and treated in Bayannur Hospital from September 2019 to December 2021 were selected. Following up for one year, 30 patients suffered from cardiovascular and cerebrovascular events, and 180 T2DM patients were divided into an event group (30 cases) and an event free group (150 cases). The general data [age, gender, body mass index (BMI), blood glucose, blood lipids, blood pressure, smoking, drinking, and drug use] were collected. The carotid intima-media thickness (IMT), left ventricular end-diastolic diameter (LVEDD), left ventricular end-systolic diameter (LVESD), and left ventricular ejection fraction (LVEF) were examined. The total cholesterol (TC), triglyceride (TG), low-density lipoprotein cholesterol (LDL-C), non-high-density lipoprotein cholesterol (non-HDL-C), homocysteine (Hcy), and N-terminal probrain natriuretic peptide (NT-proBNP) were measured. Logistic regression analysis was used to screen the risk factors of cardiovascular and cerebrovascular diseases in T2DM patients. χ2 test and independent sample t test were used. Results The smoking rate in the event group was 86.7% (26/30), the BMI was (27.1±3.8) kg/m2, the systolic blood pressure (SBP) was (149.7±15.3) mmHg (1 mmHg=0.133 kPa), the diastolic blood pressure (DBP) was (95.1±11.8) mmHg, the non-HDL-C was (6.63±2.21) mmol/L, the NT-proBNP was (542.38±56.73) ng/L, the Hcy was (25.43±5.69) μmol/L, the proportion of antihypertensive drugs used was 36.7% (11/30), the proportion of statins used was 23.3% (7/30), and the differences were statistically significant compared with those in the event free group [30.0% (45/150), (24.9±3.7) kg/m2, (137.9±14.9) mmHg, (89.6±8.7) mmHg, (4.42±1.39) mmol/L, (376.51±34.06) ng/L, (13.22±2.31) μmol/L, 60.0% (90/150), and 45.3% (68/150)] (χ2=33.609, P<0.001; t=2.960, P=0.003; t=3.942, P<0.001; t=2.425, P=0.020; t=5.273, P<0.001; t=15.467, P<0.001; t=11.564, P<0.001; χ2=5.527, P=0.019; χ2=4.978, P=0.026). The detection rate of carotid plaque in the event group was 56.7% (17/30), the LVEDD was (59.1±7.2) mm, the LVESD was (45.3±9.4) mm, the LVEF was (44.1±8.2) %, and the differences were statistically significant compared with those in the event free group [33.3% (50/150), (50.8±5.3) mm, (38.3±1.3) mm, and (47.7±6.3) %] (χ2=5.825, P=0.016; t=6.026, P<0.001; t=4.071, P<0.001; t=2.274, P=0.029). Logistic regression analysis showed that smoking (P<0.001), BMI (P=0.014), SBP (P=0.003), DBP (P=0.014), carotid plaque detection rate (P=0.003), use of antihypertensive drugs (P=0.016), use of statins (P=0.019), LVEDD (P=0.011), LVESD (P=0.031), LVEF (P=0.024), non-HDL-C (P<0.001), NT-proBNP (P=0.004), and Hcy (P=0.002) were independent risk factors for cardiovascular and cerebrovascular events in T2DM patients. Conclusion Smoking, BMI, SBP, DBP, carotid plaque detection rate, use of antihypertensive drugs, use of statins, LVEDD, LVESD, LVEF, non-HDL-C, NT-proBNP, and Hcy were all independent risk factors for cardiovascular and cerebrovascular events in patients with diabetes.