Background: Pain resulting from therapeutic procedures and injections is a prevalent source of stress for children. Immediate side effects of pain in infants include syncope, irritability, sleep disturbances, and nutritional issues. This study aimed to investigate the effects of oral melatonin on alleviating pain and anxiety in pediatric patients undergoing venipuncture. Methods: This double-blind, randomized controlled trial was conducted in the pediatric emergency ward. Patients were randomly assigned to one of two groups; the intervention group received 0.5 mg/kg of oral melatonin (maximum 5 mg) 30 min before venipuncture, while the placebo group received an equivalent amount of a placebo 30 min before the procedure. Using the Face, Legs, Activity, Cry, Consolability (FLACC) scale, postcanulation fear, pain severity, compliance, and potential side effects were evaluated. Results: In total, 202 patients (113 male and 89 female) in the intervention and control groups were included in the analysis. The mean pain score during venipuncture was 1.52±3.04 in the intervention group and 2.04±6.57 in the control group (P<0.001). In the intervention group, only 19 (18.8%) patients reported pain during venipuncture, whereas 79 (78.2%) patients in the control group reported pain (P<0.001). Less than half (44.6%) of the patients in the intervention group experienced anxiety during venipuncture, while the majority (94.1%) of the patients in the control group exhibited anxiety (P<0.001). The venipuncture success rate was 60.4% in the intervention group and 51.5% in the control group (P=0.257). Conclusion: Administering 0.5 mg/kg of oral Melatonin 30 min before venipuncture reduces procedure-related pain and anxiety in pediatric patients and may be associated with higher venipuncture success rates.