The main aim of this study is to obtain novel molecules that are more selective on cancer cells compared to healthy cells. For this purpose, four hit molecules are identified using 11 new pharmacophore hypotheses followed by scanning the in‐house database. Then, based on those hit molecules, the synthesis and analysis of four different series (three quinazolines and one quinoline series) are carried out, and their anticancer activity is investigated. Finally, by using molecular docking and dynamics simulation methods, binding mode and structure–activity relationship are examined. Among the quinazolin‐4(3H)‐one derivatives, those containing halogen atom are found to be potentially effective, while the best epidermal growth factor receptor (EGFR) inhibition and apoptosis induction are displayed by compounds containing 4‐amino‐1,2,4‐triazole moiety. Notably, four compounds (4h, 8d, 8l, and 8m) show EGFR inhibition activity at 5.298 ± 0.164, 5.46 ± 0.221, 2.670 ± 0.124, and 2.191 ± 0.908 × 10−9 m, their inhibitory activity is similar to or stronger than gefitinib (IC50: 4.169 ± 0.156 × 10−9 m). In addition, EGFR inhibitor concentration of 4g, 8e, and 8o is determined as 27588 ± 6.945, 52.41 ± 2.312, and 33657 ± 8.512 × 10−9 m. These findings indicate that generated pharmacophore hypotheses successfully determine new EGFR inhibitors. In conclusion, four novel compounds, more active than gefitinib with fewer side effects, are reached, and the structure–activity relationships are clarified.