| Objective To observe the effect of Shenqi Yifei Decoction combined with immunotherapy on the immune function and quality of life of patients with advanced NSCLC. Methods Fifty-five patients with advanced non-small cell lung cancer with deficiency of both qi and yin were selected and randomly divided into two groups. The experimental group used Shenqi Yifei Decoction combined with immune drugs, and the control group used immune single drugs. The efficacy was evaluated after 4 cycles of treatment. Results After treatment, the total score of TCM syndrome scores in the test group and the scores of Shenpi fatigue, shortness of breath, lazy speech, dry mouth and throat decreased compared with before treatment, while the control group only had Shenpi fatigue score lower than before, and the test group's syndromes The improvement rate is higher than that of the control group. In the PACT-L scale, the scores of the patients in the test group in the PWB, SWB, EWB, FWB, and LCS areas were significantly improved compared with the total scores before the treatment; while the control group was in the PWB, EWB, and LCS areas. The total score also increased compared with that before treatment; but the test group's scores in the PWB, FWB, and LCS fields and the overall score improvement were higher than those of the control group. After treatment, the levels of CD3+ and CD4+ in the two groups were higher than before treatment; but the levels of CD3+ and CD4+ in the test group were higher than those in the control group; the ratio of CD4+/CD8+ in the test group was significantly higher than that before treatment, while the control group had no significant change. There was no significant change in the KPS scores of the two groups of patients before and after treatment. After treatment, the levels of CEA, CYFRA21-1 in the experimental group were significantly lower than before treatment, while the levels of CEA, CYFRA21-1 and CA125 in the control group did not change significantly before and after treatment. Conclusion Shenqi Yifei Decoction combined with immunotherapy can improve the symptoms of deficiency of both Qi and Yin, improve the quality of life, enhance immune function, reduce the level of tumor markers, and improve the prognosis of patients.