Co-expression of the epidermal growth factor receptor (EGFR, also known as ErbB1) and human epidermal growth factor receptor 2 (HER2) has been identified as a diagnostic or prognostic sign in various tumors. Despite the fact that lapatinib (EGFR/HER2 dual inhibitor) has shown to be successful, many patients do not respond to it or develop resistance for a variety of reasons that are still unclear. As a result, new approaches and inhibitory small molecules are still needed for EGFR/HER2 inhibition. Herein, novel lapatinib derivatives possessing 4-anilinoquinazoline and imidazole scaffolds (6a–l) were developed and screened as EGFR/HER2 dual inhibitors. In vitro and in silico investigations revealed that compound 6j has a high affinity for the ATP-binding regions of EGFR and HER2. All of the designed candidates were predicted to not penetrate the BBB, raising the expectation for the absence of CNS side effects. At 10 µM, derivatives possessing 3-chloro-4-(pyridin-2-ylmethoxy)aniline moiety (6i–l) demonstrated outstanding ranges of percentage inhibition against EGFR (97.65–99.03%) and HER2 (87.16–96.73%). Compound 6j showed nanomolar IC50 values over both kinases (1.8 nM over EGFR and 87.8 nM over HER2). Over EGFR, compound 6j was found to be 50-fold more potent than staurosporine and 6-fold more potent than lapatinib. A kinase selectivity panel of compound 6j showed poor to weak inhibitory activity over CDK2/cyclin A, c-MET, FGFR1, KDR/VEGFR2, and P38a/MAPK14, respectively. Structure–activity relationship (SAR) that were obtained with different substitutions were justified. Additionally, molecular docking and molecular dynamics studies revealed insights into the binding mode of the target compounds. Thus, compound 6j was identified as a highly effective and dual EGFR/HER2 inhibitor worthy of further investigation.