Objective To analyze the effect of ultrasound-guided erector spinae plane block in thoracoscopic lobectomy in elderly patients.Methods From January 2018 to February 2020,72 elderly patients who underwent thoracoscopic lobectomy in the Department of Anesthesiology,Affiliated Hospital of Liaoning University of Traditional Chinese Medicine were selected as research objects,and they were divided into control group and observation group by random number table method,with 36 cases in each group.The control group was given total intravenous anesthesia,while the observation group was given ultrasound-guided erector spinae plane block on the basis of the control group.The lung function,ventilation disturbance before anesthesia induction(T0),after tracheal tube removal(T1)and after thoracic drainage tube removal(T2)and postoperative analgesia were compared between the two groups.Results There were no significant differences in the peak expiratory flow rate(PEFR),the forced expiratory volume in 1 second(FEV1),the forced vital capacity(FVC)and FEV1/FVC between the two groups at T0(P>0.05).The PEFR,FEV1,FVC at T1 and T2 in the two groups were lower than T0,and the differences were statistically significant(P<0.05).The PEFR in the observation group was higher than that at T1,and higher than that in the control group,the differences were statistically significant(P<0.05).The FEV1 in the observation group was higher than that in the control group at T1,and the difference was statistically significant(P<0.05).The FEV1 in the control group at T2 was higher than that at T1,and the difference was statistically significant(P<0.05).The FVC in the observation group was higher than that in the control group at T2,and the difference was statistically significant(P<0.05).At T1,the proportion of patients with restrictive,obstructive and mixed ventilation disorders in the observation group were lower than that in the control group,and the differences were statistically significant(P<0.05).There were no significant differences between the two groups in the occurrence of different types of ventilation disorders at T0 and T2(P>0.05).During the postoperative hospitalization,the actual times of pressure and remedial analgesia in the observation group were lower than those in the control group,and the differences were statistically significant(P<0.05).There was no significant difference in the effective pressing times of analgesic pump between the two groups(P>0.05).Conclusion Anesthesia of elderly patients undergoing thoracoscopic lobectomy combined with ultrasound-guided erector spinae plane block on the basis of total intravenous anesthesia could effectively improve the pulmonary function of patients and reduce the occurrence of ventilation disorder,and has better analgesic effect without increasing the occurrence of complications.