Objective: To evaluate the efficacy and safety of a midazolam oral solution used in combination with dexmedetomidine nasal drops in procedural sedation for paediatric pulmonary function testing. Methods: A randomized, double-blind, controlled clinical trial was conducted to assign paediatric patients (aged 6 months to 6 years) undergoing pulmonary function testing under procedural sedation to two groups: one group (M-D group) received 0.25 mg/kg midazolam via oral solution plus 0.2 μg/kg dexmedetomidine nasal drops (n=60), and the other group (C-D group) received 30 mg/kg chloral hydrate via oral solution plus 0.2 μg/kg dexmedetomidine nasal drops (n=60). The modified Ramsay sedation scale was used to assess the depth of sedation. The primary outcomes included the first-time sedation success rate, onset time, sedation duration, recovery time, and incidence of adverse events such as bradycardia, respiratory depression, nausea, vomiting, and medication acceptance. Results: There was no significant difference in the baseline characteristics between the two groups. The first-time sedation success rates did not significantly differ between the M-D and C-D groups (93.3% vs. 96.7%, P=0.679). The onset time of the M-D group was longer than that of the C-D group (25.97 min vs. 19.43 min, P=0.000). There were no significant differences in sedation duration (35.95 min vs. 39.93 min, P=0.129) or recovery time (18.34 min vs. 22.51 min, P=0.122) between the two groups. Moreover, the incidence of adverse events did not significantly differ (11.7% vs. 20.0%, P=0.21). All the children completed the test on the same day. Medication acceptance was significantly greater in the M-D group than in the C-D group (P=0.00). Conclusion: The combination of midazolam oral solution and dexmedetomidine nasal drops is an effective and safe sedation regimen for paediatric pulmonary function testing that improves medication acceptance and parental satisfaction. This study provides robust support for the smooth performance of paediatric pulmonary function testing and merits clinical promotion and application.