ObjectivesIn non‐small cell lung cancer (NSCLC), the immune system and possibly its composition affect survival. In this in silico study, the immune infiltrate composition in NSCLC patients was evaluated.MethodsGene expression data of tumors from early NSCLC patients were obtained from Gene Expression Omnibus (GEO). With CIBERSORT, 22 immune cell fractions were estimated.ResultsThe immune infiltrate of 1430 pretreatment NSCLC patients contained mostly plasma cells, macrophages and CD8 T cells. Higher fractions of resting mast and CD4 T‐helper cells were associated with longer overall survival (OS) (HR = 0.95, P < 0.01; HR = 0.98, = 0.04, respectively) and higher fractions of M2 macrophages and active dendritic cells with shorter survival (HR = 1.02, P = 0.03; HR = 1.03, P = 0.05, respectively). Adenocarcinoma patients with survival data (n = 587) showed higher fractions of resting mast and resting CD4 T cells, and lower M0 macrophages than squamous cell carcinoma (n = 254), which were associated with OS (HR = 0.95, P = 0.04; HR = 0.97, P = 0.01; HR = 1.03, P = 0.01, respectively). Fractions of memory B cells, naïve CD4 T cells and neutrophils had different associations with survival depending on the subtype. Smokers had had higher fractions of regulatory T cell, follicular helper T cell, neutrophil and M2 macrophage, which were associated with shorter survival (HR = 1.3, P < 0.01; HR = 1.13, P = 0.02; HR = 1.09, P = 0.03; HR = 1.04, P = 0.02, respectively).ConclusionPretreatment differences in immune cell composition in NSCLC are associated with survival and depend on smoking status and histological subtype. Smokers' immune composition is associated with lower survival.