The T790M secondary mutation in EGFR confers therapeutic resistance to EGFR-TKIs, leading to poor outcomes. Non-small-cell lung cancer (NSCLC) harboring EGFR T790M mutation is incurable and there is an urgent need for improved therapeutics. Here we report the identification of a small compound, MG-3C, that kills NSCLC cells with T790M mutation while sparing lung cancer cells without T790M mutation. We found that MG-3C activity targets EGFR-STAT3 signaling pathway in NSCLC through direct inhibition of matrix metalloproteinase 9 (MMP-9), ultimately leading to G2/M phase arrest, growth inhibition and apoptosis. Compared with the reported MMP-9 inhibitor Ilomastat, MG-3C shows high anticancer activity and affinity for targets. MG-3C forms hydrogen bonds with the ASP-113, ASP-201 and HIS-203 amino acid residues of MMP-9 with a docking fraction of -9.04 kcal/mol, while Ilomastat forms hydrogen bonds with the GLN-169, ASP-201 and HIS-203 amino acid residues of MMP-9 with a docking fraction of -5.98 kcal/mol. The spatial structure composed of ASP-113, ASP-201, and HIS-203 of MMP-9 provides a new coordinate for the design of MMP-9 inhibitors. Most importantly, subcutaneous and oral administration of MG-3C elicit dramatic regression of NSCLC xenograft tumors harboring T790M mutation as well as favorable biosafety profile in vivo, suggesting that MG-3C may be a potential candidate for NSCLC harboring T790M mutation.