61 advanced KRAS mutant NSCLC patients treated with immunotherapy were enrolled. SHP2 was heterogeneously expressed in 32 samples and highly expressed (H-score>10) in 25 (78.1%) samples. Patients with high SHP2 expression made up 100.0% of the partial response (PR) and 80.0% of the stable disease (SD), while 50.0% of the progress disease (PD). High expression level of SHP2 was associated with longer progression-free survival (PFS) and overall survival (OS) (P < 0.001, P = 0.013).