Non-small cell lung cancer (NSCLC) caused by mutation of the epidermal growth factor receptor (EGFR) is a major cause of death worldwide. Tyrosine kinase inhibitors (TKIs) of EGFR have been developed and show promising results at the initial stage of therapy. However, in most cases, their efficacy becomes limited due to the emergence of secondary mutations causing drug resistance after about a year. In this work, we investigated the mechanism of drug resistance due to these mutations. We performed molecular dynamics (MD) simulations of EGFR-drug interactions to obtain Euclidean distance and binding free energy values to analyse drug resistance and visualize drug-protein interactions. A PCA-based method is proposed to find normal, rigid, flexible, and critical residues. We have established a systematic method for the visualization of protein-drug interactions, which provides an effective framework for the analysis of drug resistance in lung cancer at the atomic level.