Due to decreased immunity, both antibiotics and antifungals are regularly used in pediatric hematologic-cancer patients as a means to prevent severe infections and febrile neutropenia. The general effect of antibiotics on the human gut microbiome is profound, yielding decreased diversity and changes in community structure. However, the specific effect on pediatric oncology patients is not well-studied. The effect of antifungal use is even less understood, having been studied only in mouse models. Because the composition of the gut microbiome is associated with regulation of hematopoiesis, immune function and gastrointestinal integrity, changes within the patient gut can have implications for the clinical management of hematologic malignancies. The pediatric population is particularly challenging because the composition of the microbiome is age dependent, with some of the most pronounced changes occurring in the first three years of life. We investigated how antibiotic and antifungal use shapes the taxonomic composition of the stool microbiome in pediatric patients with leukemia and lymphoma, as inferred from both 16S rRNA and metagenome data. Associations with age, antibiotic use and antifungal use were investigated using multiple analysis methods. In addition, multivariable differential abundance was used to identify and assess specific taxa that were associated with multiple variables. Both antibiotics and antifungals were linked to a general decline in diversity in stool samples, which included a decrease in relative abundance in butyrate producers that play a critical role in host gut physiology (e.g., Faecalibacterium, Anaerostipes, Dorea, Blautia),. Furthermore, antifungal use was associated with a significant increase in relative abundance of opportunistic pathogens. Collectively, these findings have important implications for the treatment of leukemia and lymphoma patients. Butyrate is important for gastrointestinal integrity; it inhibits inflammation, reinforces colonic defense, mucosal immunity. and decreases oxidative stress. The routine use of broad-spectrum anti-infectives in pediatric oncology patients could simultaneously contribute to a decline in gastrointestinal integrity and colonic defense while promoting increases in opportunistic pathogens within the patient gut. Because the gut microbiome has been linked to both short-term clinical outcomes, and longer-lasting health effects, systematic characterization of the gut microbiome in pediatric patients during, and beyond, treatment is warranted.