Structural modification based on existing drugs, which ensures the safety of marketed drugs, is an essential approach in developing new drugs. In this study, we modified the structure of cabotegravir by introducing the front alkyne on the core structure through chemical reaction, resulting in the synthesis of 9 compounds resembling 1,2,3‐triazoles. The potential of these new cabotegravir derivatives as tumor suppressors in gastrointestinal tumors was investigated. Based on the MTT experiment, most compounds showed a reduction in the viability of KYSE30 and HCT116 cells. Notably, derivatives 5b and 5h exhibited the most significant inhibitory effects. To further explore the effects of derivatives 5b and 5h on gastrointestinal tumors, KYSE30 cells were chosen as a representative cell line. Both derivatives can effectively curtail the migration and invasion capabilities of KYSE30 cells and induce apoptosis in a dose‐dependent manner. We further demonstrated these derivatives induce cell apoptosis in KYSE30 cells by inhibiting the expression of Stat3 protein and Smad2/3 protein. Based on the above results, we suggest they show promise in developing drugs for esophageal squamous cell carcinoma.