Gefitinib (GFB) is a well-established EGFR inhibitor used in the treatment of non-small cell lung cancer (NSCLC) that has shown resistance in certain cases of this cancer. In this work, we aimed to enhance GFB's inhibitory activity using alchemical free energy calculations, leading to the design of five new quinazoline derivatives. Among these, compound 8a was the most potent, inhibiting EGFR at 10 µM and showing significant antiproliferative effects at 25 µM. Further optimization identified two new compounds, NCU00 and NCU01, with improved EGFR inhibition and superior cytotoxicity in four NSCLC cell lines compared to GFB. Molecular dynamics simulations revealed crucial interactions that contribute to the enhanced inhibitory activity of NCU00 and NCU01. Toxicological assessments in mice showed no adverse effects on kidney or liver function, and NCU01 exhibited no developmental toxicity in zebrafish embryos. This study highlights the effectiveness of alchemical free energy methods in optimizing quinazoline-bearing EGFR inhibitors.