These results show that alpha-estradiol and (R)-(−)-ibuprofen inhibit the migration and invasion of gastric cancer cells by regulating the stability of G-quadruplexes in the GLI1 promoter. This evidence concerns the gene GLI1 and gastric cancer.