Assessing pain in infants and neonates is challenging due to their inability to communicate verbally. While validated subjective tools exist, they rely on interpreting the child's behavior, leading to potential inconsistencies and underestimation of pain. Based on heart rate variability, the newborn infant parasympathetic evaluation (NIPE) index offers a more objective approach to pain assessment in children under 2 years. Although promising, research on its effectiveness during surgery under general anesthesia remains limited and inconclusive. This study compared the effectiveness of NIPE-guided fentanyl administration to traditional vital signs (heart rate and mean arterial pressure) in managing pain during surgery in children under 2 years. Seventy children undergoing head, neck, or upper extremity surgery were randomized into group N (NIPE) or group C (Control) with 35 participants in each group. Both groups received standardized anesthesia and monitoring, including NIPE. Group N received fentanyl when NIPE scores fell below 50, while group C received fentanyl upon a 20% increase in heart rate or mean arterial pressure (MAP). Postoperative pain was assessed using the Face, Legs, Activity, Cry, and Consolability (FLACC) scores, alongside fentanyl consumption, sedation levels, and potential side effects. Both groups exhibited similar outcomes in terms of postoperative pain scores, fentanyl consumption, sedation levels, and absence of side effects (postoperative respiratory depression or nausea and vomiting). Additionally, intraoperative NIPE scores, heart rate, and MAP were comparable between the groups. There are strong correlations between both groups in terms of NIPE scores (r = 0.735, p < 0.0001), heart rate (r = 0.630, p < 0.0001), and MAP (r = 0.846, p < 0.0001). In both group C and group N, the NIPE scores reveal strong negative correlations with heart rate (r = -0.610, p < 0.0001, and r = -0.674, p < 0.0001) and MAP (r = -0.860, p < 0.0001, and r = -0.756, p < 0.0001). NIPE-guided intraoperative fentanyl administration was not superior to heart rate/MAP-guided administration, as both achieved similar pain management outcomes in this study. However, NIPE may offer a more practical and precise approach, as it is an objective tool with a defined threshold. These findings suggest NIPE's promise as a valuable tool for managing pain in children under 2 years undergoing surgery. However, confirmation of its widespread effectiveness requires further research with larger, multicenter studies encompassing procedures with a broader spectrum of pain severity.