Objective To explore and analyze the application of Esketamine combined with sacral anesthesia in children's hernia surgery. Methods From May 2020 to May 2021, 98 children with hernia surgery in Nanping First Hospital were selected as the research objects, and divided into the control group and the observation group by random number table method, 49 cases in each group. The Sevoflurane inhalation combined with caudal anesthesia was used in the control group. The observation group was treated with Esketamine combined with sacral anesthsia. The perioperative heart rate (HR), mean arterial pressure (MAP) and blood oxygen saturation, the time of body movement (eye opening)after anesthesia, the time to leave the operating room, the time to fully wake up, the total incidence of perioperative adverse reactions were compared between the two groups, and modified faces, legs, activity, cry and consolability scale(FLACC) score at different time points after waking up were compared between the two groups. Results The HR and MAP values of the observation group were lower than those of the control group at the time of anesthesia puncture, 30 min after anesthesia, and at the end of the operation, and the differences were statistically significant (P<0.05). The time of body movement (eye opening), the time to leave the operating room and the time to fully wake up in the observation group were shorter than those in the control group, and the differences were statistically significant (P<0.05). The FLACC score of the observation group at 4, 8, 24 and 48 h after wake up were lower than those of the control group, and the differences were statistically significant (P<0.05). There was no significant difference in the total incidence of perioperative adverse reactions between the two groups (P>0.05). Conclusion On the basis of Sevoflurane inhalation combined with sacral anesthesia and Esketamine applied to children with hernia, the perioperative indicators can be more stable, the recovery time after anesthesia and the time out of the operating room are shorter, and the postoperative pain is more severe. And there are no obvious adverse reactions in the perioperative period, and the safety is high.