Diabetes mellitus is a risk factor for adverse cardiovascular events, and it can raise the risk of heart failure. The right ventricle makes an important contribution to overall cardiac function, and right ventricular(RV) dysfunction will affect the course and outcome of the disease, therefore, early identification of right ventricular myocardial systolic dysfunction is of great clinical importance. We sought to apply two-dimensional speckle-tracking echocardiography (2D-STE) techniques to determine whether right ventricular global longitudinal strain (RVGLS) and right ventricular free wall strain (RV-FWLS) are altered in patients with prediabetes and diabetes mellitus.This cross-sectional study included 43 patients with prediabetes,52 patients with type 2 diabetes mellitus(T2DM), and 49 age- and sex-matched healthy volunteers were included as controls. Conventional echocardiography measured tricuspid annular systolic excursion (TAPSE), tricuspid valve systolic velocity (RV-S'), and right ventricular fractional change (RV-FAC), and 2D-STE measured left ventricular longitudinal strain (LVGLS), RVGLS, and RV-FWLS. The results showed that TAPSE was not significantly different between the prediabetes group and the control and diabetic groups and RV-S' velocity was not significantly different among the three groups. RV-FAC showed no statistically significant difference between the prediabetes and diabetic groups, RVGLS were significantly impaired and significantly different in the three groups (P=0.000).RVGLS modestly correlated with glycosylated hemoglobin A1c(HbA1c)(r=﹣0.576,P=0.000), and weakly with RVFAC(r=0.398,P=0.000), LVGLS(r=0.416,P=0.000), sex(r=﹣0.205,P=0.014),BMI(r=﹣0.195,P=0.019),heart rate(r=﹣0.216,P=0.009),Triglycerides(r=﹣0.198,P=0.025),interventricular septal thickness(r=﹣0.208,P=0.012),LV end-diastolic diameter(r=0.210,P=0.012),septum strain(r=0.438,P=0.000). Further regression analysis we found that HbA1c(B=﹣0.440,P= .000), septum strain (B=0.301, P=0.000),LV end-diastolic diameter (B=0.226, P=0.001), sex(B=﹣0.134, P=.043) were independently associated with RVGLS in the whole study population.RVGLS was the best diagnostic indicator for prediabetes and diabetes (AUC values of 0.689 and 0.731, respectively), and a cut-off value of RVGLS ≤18.95% had 85% sensitivity and 61% specificity for the diagnosis of prediabetes and ≤17.55% had 82% sensitivity and 58% specificity for the diagnosis of diabetes. Therefore, we believe that abnormally elevated hyperglycemia negatively affects the myocardial function of the right ventricle, The decrease of right ventricular systolic function may be related to left ventricular remodeling and myocardial strain. two-dimensional speckle tracking echocardiography can detect subtle changes in impaired right ventricular systolic function. HbA1c, septum strain, LV end-diastolic diameter, the sex were independent risk factors for RVGLS.