RSK, or p90 ribosomal S6 kinase, plays a crucial role in tumor cell proliferation and survival, making it an appealing target for cancer therapies. With the aim to explore novel RSK inhibitors as anticancer agents, a series of 2,4-dianilinopyrimidine derivatives 2b-2n and 3a-3n have been designed and synthesized. Among them, compound 3e displayed substantial kinase inhibitory activity against RSK2 (IC50 = 37.89 ± 3.08 nM) and a potent antiproliferative effect against a range of cell lines, including HeLa, MIA PaCa-2, U937, SW620, HT-29, AGS, and two kinds of EGFR mutant cells (IC50s = 0.189-0.572 μM). Additionally, compound 3e exhibited a high affinity for RSK and effectively inhibited RSK activity in HeLa cells. It triggered significant apoptosis and caused cell cycle arrest in the G2/M phase. Moreover, 3e displayed considerable in vivo anticancer activity while maintaining an acceptable safety profile. These findings imply that compound 3e, featuring a 2,4-dianilinopyrimidine scaffold, could serve as a promising RSK inhibitor for cancer treatment.