Introduction: The aim of this study was to evaluate the effectiveness of oral n-acetylcysteine in preventing and/or attenuating amphotericin B-induced electrolyte imbalances in children. Materials and methods: In this study, randomly selected patients, who received amphotericin B for treatment, received N-acetylcysteine concomitantly with amphotericin, the rest did not receive N-acetylcysteine. Serum and urine electrolytes were measured in the two groups at the baseline (day 0), day 3, day 7, and day 14 of amphotericin B treatment. Results: A total of 87 patients, 48 (55.5%) male with a median age of 8 years (1 month - 18 years) were included. 37 patients received N-acetylcysteine concomitantly with amphotericin B. 19 of 37 (51.4%) patients and 44 of 50 patients (88%) who received amphotericin B without N-acetylcysteine were supplemented with potassium due to hypokalemia (p < 0.001). Mean serum magnesium value was higher in the N-acetylcysteine group on day 7 of amphotericin B treatment: 1.97 +/- 0.33 and 1.69 +/- 0.46, respectively; this was statistically significant (p = 0.025). Mean serum magnesium value was also statistically significantly higher in the N-acetylcysteine group on day 14 of treatment; 1.93 +/- 0.20 and 1.72 +/- 0.247, respectively, in both groups (p = 0.01). Conclusion: N-acetylcysteine given during amphotericin B treatment course was statistically significantly effective in attenuating hypokalemia and hypomagnesemia during amphotericin B treatment.