Treosulfan is increasingly used as myeloablative agent in conditioning regimen prior to allogeneic hematopoietic stem cell transplantation (HSCT). In our pediatric HSCT program, myalgia was regularly observed after treosulfan-based conditioning, which is a relatively unknown side effect. Using a natural language processing and text-mining tool (CDC), we investigated whether treosulfan compared with busulfan was associated with an increased risk of myalgia. Furthermore, among treosulfan users, we studied the characteristics of given treatment of myalgia, and studied prognostic factors for developing myalgia during treosulfan use. Electronic Health Records (EHRs) until 28 days after HSCT were screened using the CDC for myalgia and 22 synonyms. Time to myalgia, location of pain, duration, severity and drug treatment were collected. Pain severity was classified according to the WHO pain relief ladder. Logistic regression was performed to assess prognostic factors. 114 patients received treosulfan and 92 busulfan. Myalgia was reported in 37 patients; 34 patients in the treosulfan group and 3 patients in the busulfan group (p = 0.01). In the treosulfan group, median time to myalgia was 7 days (0–12) and median duration of pain was 19 days (4–73). 44% of patients needed strong acting opiates and adjuvant medicines (e.g. ketamine). Hemoglobinopathy was a significant risk factor, as compared to other underlying diseases (OR 7.16 95% CI 2.09–30.03, p = 0.003). Myalgia appears to be a common adverse effect of treosulfan in pediatric HSCT, especially in hemoglobinopathy. Using the CDC, EHRs were easily screened to detect this previously unknown side effect, proving the effectiveness of the tool. Recognition of treosulfan-induced myalgia is important for adequate pain management strategies and thereby for improving the quality of hospital stay.