Our aim was to evaluate the association between ritodrine and magnesium sulfate (MgSO4) and the occurrence of neonatal hyperkalemia or hypoglycemia among late preterm infants in a retrospective cohort study. We used a nationwide obstetrical database from 2014. A total of 4,622 live preterm infants born at 32-36 gestational weeks participated. Fourteen risk factors based on both clinical relevance and univariate analysis were adjusted in multivariable logistic regression analyses. Neonatal hyperkalemia and hypoglycemia occurred in 7.6% (284/3,732) and 32.4% (1,458/4,501), respectively. Occurrence of hyperkalemia was associated with concomitant usage of ritodrine and MgSO4 compared with no usage (adjusted odds ratio [aOR] 1.53, 95% confidence interval [CI] 1.09-2.15). Occurrence of hypoglycemia was associated with ritodrine alone (aOR 2.58 [CI 2.21-3.01]) and with concomitant usage of ritodrine and MgSO4 (aOR 2.59 [CI 2.13-3.15]), compared with no usage, and was associated with long-term usage (≥ 48 hours) of ritodrine and cessation directly before delivery. In conclusion, in late preterm infants, usage of ritodrine together with MgSO4 was associated with occurrence of critical neonatal hyperkalemia, and long-term usage of ritodrine and cessation directly before delivery were associated with neonatal hypoglycemia.