The predictive accuracy to treatment effect of immune therapy is still poor. Thus, we aimed to develop a predictive model based on gene mutations to assess the immunotherapeutic efficacy in non-small cell lung cancer. Then, 335 NSCLC patients treated with ICIs were included in our study. The least absolute shrinkage and selection operator Cox regression model, multivariable analysis, and Kaplan-Maire test were used in this study. In the end, we constructed a predictive model based on a 42-gene signature. Patients were classified into low-risk and high-risk groups based on risk scores generated from this model. Compared with patients in the high-risk group, patients in the low-risk group had better survival. The results were confirmed in an external validation cohort. Moreover, patients with high TMB and in the high-risk group could not benefit from ICIs. A predictive model of evaluating efficacy of immune therapy was developed and validated. The model is based on multiple genetic information and has clinical translational value.