To evaluate the value of shear wave elastic imaging (SWE) in the classification of esophageal varices (EV) and detection of rupture hemorrhage. A total of 120 patients with clinically diagnosed cirrhosis were selected from October 2017 to October 2018 and underwent ultrasonography, endoscopy, and laboratory examinations. Several factors, including gender, age, body mass index (BMI), aspartate aminotransferase (AST), AST to platelet count ratio index (APRI), portal vein diameter, platelet count, spleen thickness, liver stiffness (LS), and spleen stiffness (SS), were evaluated for their diagnostic value for EV classification and detection of rupture hemorrhage. Correlation analyses were also conducted. The APRI, portal vein diameter, platelet count, spleen thickness, LS, and SS had areas under the curve (AUCs) of 0.76, 0.81, 0.82, 0.89, 0.84, and 0.91, respectively, indicating their potential use as indices for the diagnosis of EV (all P<0.05). The platelet count and APRI could not distinguish low-risk EV from high-risk EV (P=0.301, P=0.564), but EV with or without rupture hemorrhage was identified by SS (P<0.001). Therefore, SS is a valuable factor for the identification of low-risk EV and high-risk EV, as well as for the identification of EV with or without rupture hemorrhage. Spearman's correlation analysis indicated that the occurrence of EV is moderately correlated with APRI, portal vein diameter, platelet count, and LS (r=0.41, 0.49, 0.51, 0.54, P<0.05) and highly correlated with spleen thickness and SS (r=0.63, 0.65, P<0.05). SWE demonstrated a high diagnostic value, supporting its application as a non-invasive method for predicting EV classification and rupture hemorrhage.