Background and objectives Pediatric thoracic surgery has unique considerations due to the immaturity of the respiratory system anatomically and physiologically, which presents technical and pharmacological considerations, including the very common technique of one-lung ventilation (OLV), which causes serious complications in children. Therefore, we investigated the effects of dexmedetomidine on oxygenation and pulmonary shunt fraction (Qs/Qt) in high-risk pediatric patients undergoing OLV for thoracic surgery. This randomized controlled trial aimed to investigate dexmedetomidine's effect on the partial pressure of arterial oxygen (PaO2) and pulmonary shunt fraction (Qs/Qt). Methods A total of 63 children underwent thoracic surgery with OLV and were divided into two groups. The dexmedetomidine group (group Dex, n = 32) received dexmedetomidine (0.4 μg/kg/hour), and the placebo group (group placebo, n = 31) received normal saline. Two arterial and central venous blood samples were taken for arterial and venous blood gas analysis at four time points: T1 (10 minutes after mechanical ventilation of total lung ventilation), T2 (10 minutes after OLV), T3 (60 minutes after OLV), and T4 (20 minutes after the end of OLV). At these intervals, the following parameters were measured: PaO2, Qs/Qt, mean arterial pressure (MAP), heart rate (HR), and peak inspiratory pressure (PIP). Results The two groups had no significant differences in FEV1/FVC and baseline pulmonary shunt fraction (Qs/Qt). Dexmedetomidine significantly improved PaO2 compared with placebo during OLV (T2 and T3). There was a significant decrease in Qs/Qt compared with placebo during OLV (T2, T3, and T4). There was a decrease in PIP compared with placebo during OLV (T2 and T3). No statistically significant differences in MAP or HR were observed between the groups. Conclusion Infusion of dexmedetomidine during OLV in high-risk pediatric thoracic surgery reduces shunt and pulmonary shunt fraction Qs/Qt, improves PaO2 and body oxygenation, reduces PIP and pressure load, and maintains hemodynamic stability (MAP, HR).