Common critical illnesses are a growing economic burden on healthcare worldwide. However, therapies targeting the gut microbiota for critical illnesses have not been developed on a large scale. This study aimed to investigate the changes in the characteristics of the gut microbiota in critically ill children after short-term pediatric intensive care unit (PICU) treatments. Anal swab samples were prospectively collected from March 2021 to March 2022 from children admitted to the PICU of Xinhua Hospital who received broad-spectrum antibiotics on days 1 (the D1 group) and 7 (the D7 group) of the PICU treatment. The structural and functional characteristics of the gut microbiota of critically ill children were explored using metagenomic next-generation sequencing (mNGS) technology, and a comparative analysis of samples from D1 and D7 was conducted. After 7 days of PICU admission, a significant decrease was noted in the richness of the gut microbiota in critically ill children, while the bacterial diversity and the community structure between groups remained stable to some extent. The relative abundance of Bacilli and Lactobacillales was significantly higher, and that of Campylobacter hominis was significantly lower in the D7 group than in the D1 group. The random forest model revealed that Prevotella coporis and Enterobacter cloacae were bacterial biomarkers between groups. LEfSe revealed that two Gene Ontology entries, GO:0071555 (cell wall organization) and GO:005508 (transmembrane transport), changed significantly after the short-term treatment in the PICU. In addition, 30 KEGG pathways were mainly related to the activity of enzymes and proteins during the processes of metabolism, DNA catabolism and repair, and substance transport. Finally, 31 antimicrobial resistance genes had significantly different levels between the D7 and D1 groups. The top 10 up-regulated genes were Erm(A), ErmX, LptD, eptB, SAT-4, tetO, adeJ, adeF, APH(3')-IIIa, and tetM. The composition, gene function, and resistance genes of gut microbiota of critically ill children can change significantly after short PICU treatments. Our findings provide a substantial basis for a better understanding of the structure and function of gut microbiota and their role in critical illnesses.