Asparagine endopeptidase (AEP), also called legumain, is highly expressed in various solid tumors, promoting cancer cell invasion, migration, and metastasis. It has been proposed to be a prognostic marker and therapeutic target for cancer treatment. However, an effective nonpeptide, small-molecule inhibitor against this protease has not yet been identified. Here we show that a family of xanthine derivatives selectively inhibit AEP and suppress matrix metalloproteinase (MMP) cleavage, leading to the inhibition of cancer metastasis. Through structure-activity relationship (SAR) analysis, we obtained an optimized lead compound (38u) that represses breast cancer invasion and migration. Chronic treatment of nude mice, which had been inoculated with MDA-MB-231 cells, with inhibitor 38u via oral administration robustly inhibits breast cancer lung metastasis in a dose-dependent manner, associated with blockade of MMP-2 by AEP. Therefore, our study supports that 38u might act as a potent and specific AEP inhibitor useful for cancer treatment.