Anaplastic lymphoma kinase (ALK) is a promising target for the treatment of non-small cell lung cancer. Under crizotinib treatment, drug resistance and progressive disease appeared after the point mutations arising in the kinase domain of ALK. Second-generation ALK inhibitors can solve the deficiencies of the first generation, especially the drug resistance in cancer chemotherapy. Ceritinib (LDK378), a pyrimidine derivative, for example, can inhibit the activity of ALK with an IC50 value of 40.7 nmol/L, and can experience disease progression after initial treatment with crizotinib. Unfortunately, clear structure–activity relationships have not been identified to date, impeding the rational design of future compounds possessing ALK inhibition activity. To explore interesting insights into the structures of pyrimidine derivatives that influence the activities of the second-generation ALK inhibitors, three-dimensional quantitative structure–activity relationship (3D-QSAR) and molecular docking were performed on a total of 45 derivatives of pyrimidine. Comparative molecular field analysis (CoMFA) and comparative molecular similarity index analysis (CoMSIA) techniques were used to generate 3D-QSAR models. CoMFA and CoMSIA were performed using the Sybyl X 2.0 package. Molecular docking analysis was performed using the Surflex-Dock module in SYBYL-X 2.0 package. We found in the CoMFA model that the non-cross-validated r2
value was 0.998, the cross-validated q
2 value was 0.663, and the F statistic value was 2,401.970, while the r2
value was 0.988; q
2 value was 0.730, and F value was 542.933 in CoMSIA models, suggesting the good predictability of the CoMFA and CoMSIA models. 3D contour maps and docking results suggested that different groups on the core parts of the compounds could enhance the biological activities. Based on these results, the established 3D-QSAR models and the binding structures of ALK inhibitors obtained favor the prediction of the activity of new inhibitors and will be helpful in the reasonable design of ALK inhibitors in the future.