Worldwide, colorectal cancer (CRC) is the third most common type of cancer and the second most common cause of cancer-related deaths. Thymidylate synthase (TS) is a crucial component of DNA biosynthesis and has drawn interest as an essential target for cancer treatment. In the current work, we have designed and synthesized twenty-eight new diaryl-based pyrido[2,3-d]pyrimidine/alkyl-substituted pyrido[2,3-d]pyrimidine derivatives and evaluated their anticancer activity against the HCT 116, MCF-7, Hep G2, and PC-3 cell lines cell lines. Additionally, we have carried out TS inhibitory activity and in silico studies for compounds 1n and 2j. All the synthesized compounds exhibited good anticancer activity, but among them, compounds 1n and 2j showed excellent anticancer activity, having IC50 values of 1.98 ± 0.69, 2.18 ± 0.93, 4.04 ± 1.06, and 4.18 ± 1.87 µM; and 1.48 ± 0.86, 3.18 ± 0.79, 3.44 ± 1.51, and 5.18 ± 1.85 µM, against the HCT 116, MCF-7, Hep G2, and PC-3 cell lines respectively with control raltitrexed (IC50 1.07 ± 1.08, 1.98 ± 0.72, 1.34 ± 1.0, and 3.09 ± 0.96 µM, respectively) and hTS inhibitory activity with IC50 values of 20.47 ± 1.09 and 13.48 ± 0.96 nM with control raltitrexed (IC50 14.95 ± 1.01 nM). Further, the mechanism of inhibition was revealed by molecular docking, which showed the binding pattern of 1n and 2j to the catalytic site of TS with docking scores of -10.6 and - 9.5kcal/mol, respectively, with reference raltitrexed (-9.4kcal/mol). Additionally, the assessment of physicochemical, biochemical, structural, and toxicological characteristics were also in the acceptable range for these compounds. Based on the anticancer activity of compounds, SAR was also performed for lead optimization.