The Kirsten rat sarcoma 2 viral oncogene homolog (KRAS) serves as a molecular switch, cycling between guanosine triphosphate (GTP)-bound and inactive guanosine diphosphate (GDP)-bound states. KRAS modulates numerous signal transduction pathways including the conventional RAF–MEK–ERK pathway. Mutations in the RAS genes have been linked to the formation of malignant tumors. Human malignancies typically show mutations in the Ras gene including HRAS, KRAS, and NRAS. Among all the mutations in exon 12 and exon 13 of the KRAS gene, the G12D mutation is more prevalent in pancreatic and lung cancer and accounts for around 41% of all G12 mutations, making them potential anticancer therapeutic targets. The present study is aimed at repurposing the peptide inhibitor KD2 of the KRAS G12D mutant. We employed an in-silico mutagenesis approach to design novel peptide inhibitors from the experimentally reported peptide inhibitor, and it was found that substitutions (N8W, N8I, and N8Y) might enhance the peptide’s binding affinity toward the KRAS. Molecular dynamics simulations and binding energy calculations confirmed that the newly designed peptide inhibitors are stable and that their binding affinities are stronger as compared to the wild-type peptide. The detailed analysis revealed that newly designed peptides have the potential to inhibit KRAS/Raf interaction and the oncogenic signal of the KRAS G12D mutant. Our findings strongly suggest that these peptides should be tested and clinically validated to combat the oncogenic activity of KRAS. Communicated by Ramaswamy H. Sarma