Emergence agitation (EA) is a common complication in the pediatric population. This study aimed to investigate the effect of the prophylactic nalbuphine on EA in pediatric patients receiving sevoflurane anesthesia. The children undergoing ear, nose, and throat (ENT) surgery were administered 0.2 mg/kg nalbuphine (the nalbuphine group) or the same volume of normal saline (the control group) 5 min before the end of the surgery. The extubating time, time to eye-opening and duration of the post-anesthesia care unit (PACU) were recorded. Heart rate and blood pressure were monitored before and 5 min after nalbuphine administration. Pain was assessed using Face Legs Activity Cry and Consolability (FLACC) scales, and the drug-related postoperative complications (e.g., EA, delayed awakening, nausea and vomiting, and respiratory depression) were recorded. One-hundred and thirty pediatric patients were randomly divided into nalbuphine and control groups (n = 65). The nalbuphine group showed a significantly lower incidence of EA than the control group (20% vs. 46.2%, P = 0.002). No significant differences between the two groups were observed in heart rate and blood pressure 5 min after nalbuphine administration (P > 0.05). No significant differences were observed between the two groups regarding extubating time, time to eye-opening, and duration of PACU. The FLACC scales demonstrated lower values in the nalbuphine group than in the control group during the initial 4 h after the surgery. However, the FLACC scales showed similar values between 5 and 12 h after the surgery. In summary, the results of this study demonstrated that prophylactic natbuphine could minimize the incidence of EA in pediatric patients following ENT surgery without increasing the extubating time and PACU duration. http://www.chictr.org.cn, identifier [ChiCTR2300070046].