To conclude, serum TNF‐α, IL‐1β, and IL‐17 levels are highly expressed, which are closely related to elevated anxiety and depression risks to some extent in NSCLC survivors. Here, IL17A is linked to major depressive disorder.