Glioblastoma (GBM) is a highly malignant primary brain tumor, and epidermal growth factor receptor (EGFR) is a well characterized biomaker on GBM. Treatment of GBM with EGFR inhibitors achieved limited efficacy due to low blood-brain barrier (BBB) permeability, and BBB-penetrant drugs are required. In this study, the BBB penetration of erlotinib and JN037 were studied using molecular dynamics method with explicit membrane model. The free energy profiles indicate that JCN037 has a lower central energy barrier than erlotinib, and it has a local minimum at lipid-water interface while erlotinib has not. Unconstrained MD simulations found that erlotinib prefers staying in water while JCN037 tends to interact with lipid molecules. Further analysis reveals that the Br atom of JCN037 plays an important role in its interaction with lipid molecules, and the adjacent F atom enhances the interaction of Br. The two flexible methoxyethoxy chains of erlotinib are responsible for its poor penetration. Our computational results agree well with the experimental results, providing useful information in the design and improvement of drugs with good BBB permeation.