Oncogenic RAS mutations, commonly observed in human tumors, affect approximately 30% of cancer cases and pose a significant challenge for effective cancer treatment. Current strategies to inhibit the KRAS G12D mutation have shown limited success, emphasizing the urgent need for new therapeutic approaches. In this study, we designed and synthesized several purine and pyrimidine analogs as inhibitors for the KRAS G12D mutation. Our synthesized compounds demonstrated potent anticancer activity against cell lines with the KRAS G12D mutation, effectively impeding their growth. They also exhibited low toxicity in normal cells, indicating their selective action against cancer cells harboring the KRAS G12D mutation. Notably, the lead compound, PU1-1 induced the programmed cell death of KRAS G12D-mutated cells and reduced the levels of active KRAS and its downstream signaling proteins. Moreover, PU1-1 significantly shrunk the tumor size in a pancreatic xenograft model induced by the KRAS G12D mutation, further validating its potential as a therapeutic agent. These findings highlight the potential of purine-based KRAS G12D inhibitors as candidates for targeted cancer therapy. However, further exploration and optimization of these compounds are essential to meet the unmet clinical needs of patients with KRAS-mutant cancers.