Lung cancer is a most common malignant tumor of the lung and is the cancer with the highest morbidity and mortality worldwide. For patients with advanced non-small cell lung cancer who have undergone epidermal growth factor receptor (EGFR) gene mutations, targeted drugs can be used for targeted therapy. There are many methods for detecting EGFR gene mutations, but each method has its own advantages and disadvantages. This study aims to predict the risk of EGFR gene mutation by exploring the association between the histological features of the whole slides pathology of non-small cell lung cancer hematoxylin-eosin (HE) staining and the patient's EGFR mutant gene. The experimental results show that the area under the curve (AUC) of the EGFR gene mutation risk prediction model proposed in this paper reached 72.4% on the test set, and the accuracy rate was 70.8%, which reveals the close relationship between histomorphological features and EGFR gene mutations in the whole slides pathological images of non-small cell lung cancer. In this paper, the molecular phenotypes were analyzed from the scale of the whole slides pathological images, and the combination of pathology and molecular omics was used to establish the EGFR gene mutation risk prediction model, revealing the correlation between the whole slides pathological images and EGFR gene mutation risk. It could provide a promising research direction for this field.