Objective To investigate the effect of esketamine on perioperative pain and depression in patients with thoracoscopic pulmonary nodule resection.Methods A total of 120 patients with selec-tive thoracoscopic pulmonary nodule resection were randomly divided into low-dose esketamine group(group L),high-dose esketamine group(group H)and saline control group(group C),with 40 cases in each group.Before skin incisionafter anesthetic induction,0.25 mg/kgesketamine,0.50 mg/kg esketamine and the equivalent amount of saline were separately administered for patients in the three groups.Visual Analogue Scale(VAS)score for pain and the Self-rating Depression Scale(SDS)score were compared among the three groups at the time points of one day before surgery(T0),one day after surgery(T1),three days after surgery(T2),and the day of discharge(T3),and postopera-tive analgesia within 24 h and perioperative adverse reactions were also recorded.Results The VAS scores for rest and coughing at T1 were significantly lower in group L and group H than group C(P<0.05);compared with group C,the total press number of analgesic pump with in 24 h and effec-tive press number were significantly decreased in group L and group H,and the dosage of sufentanil was also significantly decreased(P<0.05).There were no significant differences in depression scores at different time points among the three groups(P>0.05).There were no significant differences in the incidence rates of nausea,vomiting,dizziness,hallucinations,and nightmares among the three groups(P>0.05).Conclusion Esketamine can effectively alleviate pain on the first day after oper-ation and reduce the dosage of opioid analgesics without increasing the incidence of adverse reactions in patients with thoracoscopic pulmonary nodule resection;compared with 0.25 mg/kg esketamine,0.50 mg/kg esketamine doesn't demonstrate better postoperative analgesia or improvement in periop-erative depression.