Background: The anesthetic effect is an important factor in the success of surgery and is closely related to the prognosis of children received tonsillectomy. Esketamine has been used in clinic and plays a better anesthetic, sedative and analgesic effect.Objective: The application effect of esketamine in pediatric tonsillectomy was evaluated to explore its effect on postoperative agitation and pain in children, to provide experience for clinical medication.Results: The experimental group had a lower incidence of cough, and the degree of cough was mild. There were no significant differences in operation time, awakening time, and residence time in the recovery room after anesthesia between the two groups. Patients in the control group had worse condition of postoperative agitation and pain, reflecting as the higher values of PAED and FLACC score. Although the incidence of postoperative dizziness in the experimental group was significantly higher than that in the control group, the symptoms of dizziness were mild, and there was no significant difference in respiratory depression, nausea and vomiting, somnolence, and mental system side effects between the two groups.Conclusion: Esketamine can reduce the incidence of cough during anesthesia recovery period in children underwent tonsillectomy, reduce postoperative agitation, improve postoperative analgesia, and has mild adverse reactions.