The study aimed to investigate the mechanism of action of β-elemene (ELE) in the treatment of esophageal cancer (EC). In this study, public databases were used to predict related targets in ELE and EC. The network analysis was performed to identify key targets of ELE in EC treatment. Further, bioinformatics and DAVID databases were used for GO and KEGG enrichment analysis, respectively. Ultimately, molecular docking and in vitro cell experiments were conducted to validate the results of network pharmacology enrichment. As a result, 34 candidate targets for ELE in the treatment of EC were obtained, and five key targets (STAT3, EGFR, CTNNB1, BCL2L1 and CASP9) were identified. GO functional annotation yielded 2200 GO entries (p < 0.05). KEGG signaling pathway enrichment analysis screened 100 pathways (p < 0.05). Molecular docking results showed that ELE had similar affinity with five key targets. In vitro experiments showed that the expressions of STAT3, EGFR and BCL2L1 were significantly decreased, and the expression of CASP9 in the ELE intervention group was significantly increased compared with that in the control group. All in all, ELE may play a key role in the treatment of EC by regulating the expression of STAT3, EGFR, BCL2L1 and CASP9.