Gastric cancer is a common gastrointestinal cancer. Survival outcome for patients with the recurrence or metastasis remains poor due to the lack of effective targeting drugs. The mechanisms of non-histone acetylation modifications are key epigenetic regulations that participate in various biological processes. HDAC6 is mostly located in the cytoplasm to deacetylate non-histone substrates, which has been identified as a critical promoter of many oncogenic pathways in cancers, including gastric cancer. Nevertheless, its inhibitor has not been applied in gastric cancer clinically. In this study, we identified canagliflozin as an active HDAC6-targeted inhibitor from FDA-approved Drug Library by enzymatic assay. The strong affinity of the compounds with HDAC6 was further verified by surface plasmon resonance (SPR) and cellular thermal shift assay (CETSA). In addition, molecular docking showed that canagliflozin could bind to the active pocket of HDAC6 and form interactions with key residues. Further experiments revealed that canagliflozin could effectively inhibit the migration and epithelial-mesenchymal-transition (EMT) of gastric cancer cells in vitro and in vivo. These results reveal a novel finding that canagliflozin has the potential to be an effective agent in inhibiting gastric cancer metastasis.