Signal transducer and activator of transcription 3 (STAT3) plays important roles in multiple aspects of cancer aggressiveness including migration, invasion, survival, self-renewal, angiogenesis, and tumor cell immune evasion by regulating the expression of multiple downstream target genes. STAT3 is constitutively activated in many malignant tumors and its activation is associated with high histological grade and advanced cancer stages. Thus, inhibiting STAT3 promises an attracting strategy for treatment of advanced and metastatic cancers. Herein, we identified a STAT3 inhibitor, inS3-54, by targeting the DNA-binding domain of STAT3 using an improved virtual screening strategy. InS3-54 preferentially suppresses proliferation of cancer over non-cancer cells and inhibits migration and invasion of malignant cells. Biochemical analyses show that inS3-54 selectively inhibits STAT3 binding to DNA without affecting the activation and dimerization of STAT3. Furthermore, inS3-54 inhibits expression of STAT3 downstream target genes and STAT3 binding to chromatin in situ. Thus, inS3-54 represents a novel probe for development of specific inhibitors targeting the DNA-binding domain of STAT3 and a potential therapeutic for cancer treatments.