Melanoma is a highly aggressive skin cancer with strong metastatic potential, posing significant clinical challenges. Currently, melanoma treatment commonly includes chemotherapy and immunotherapy; nevertheless, the treatment modalities have specific limitations. PTPN2 (protein tyrosine phosphatase nonreceptor type 2) has emerged as a promising therapeutic target. Through rational drug design, we identified compound K-38, a potent PTPN2 inhibitor (IC50 = 7.05 nM) with high safety (hERG IC50 > 40 μM) and excellent liver metabolic stability (T1/2 = 408 min). Compound K-38 also showed improved oral bioavailability (F = 10.46%) over AC-484 (F = 1.40%) (Zheng European Journal of Medicinal Chemistry 2024, 270, 116390, ). In vivo, compound K-38 significantly suppressed melanoma growth, especially when combined with anti-PD-1 therapy, outperforming AC-484. It enhanced lymphocyte infiltration into tumors and modulated IFN-γ signaling pathways. These findings indicate that compound K-38 is a potent small molecule inhibitor of PTPN2, laying the groundwork for the future development of PTPN2-targeted therapeutics.