The invention belongs to the pharmaceutical chemistry field, and discloses a compound for inhibiting glycogen synthase kinase-3beta (GSK-3beta) in a formula I, its pharmaceutically acceptable salt, or an application of its pharmaceutical composition for preventing and treating the GSK-3beta-related diseases. The compound is a GSK-3beta small-molecule inhibitor, its action mode is non-ATP-competitive competition, and can be used for preparing the medicines for preventing and treating the GSK-3beta-related diseases, and the GSK-3beta-related diseases can be diabetes, Alzheimer's disease, stomach cancer, colorectal cancer, pancreas cancer, liver cancer or mixed acute leukemia. According to the compound, R1, R2, R3, X, Y are consistent with detailed description in the invention.