while most gut microbiota research has focused on term infants, the health outcomes of preterm infants are equally important. Very-low-birth-weight (VLBW) or extremely-low-birth-weight (ELBW) preterm infants have a unique gut microbiota structure, and probiotics have been reported to somewhat accelerate the maturation of the gut microbiota and reduce intestinal inflammation in very-low preterm infants, thereby improving their long-term outcomes. The aim of this study was to investigate the structure of gut microbiota in ELBW neonates to facilitate the early identification of different types of low-birth-weight (LBW) preterm infants. a total of 98 fecal samples from 39 low-birth-weight preterm infants were included in this study. Three groups were categorized according to different birth weights: ELBW (n = 39), VLBW (n = 39), and LBW (n = 20). The gut microbiota structure of neonates was obtained by 16S rRNA gene sequencing, and microbiome analysis was conducted. The community state type (CST) of the microbiota was predicted, and correlation analysis was conducted with clinical indicators. Differences in the gut microbiota composition among ELBW, VLBW, and LBW were compared. The value of gut microbiota composition in the diagnosis of extremely low birth weight was assessed via a random forest-machine learning approach. we briefly analyzed the structure of the gut microbiota of preterm infants with low birth weight and found that the ELBW, VLBW, and LBW groups exhibited gut microbiota with heterogeneous compositions. Low-birth-weight preterm infants showed five CSTs dominated by Enterococcus, Staphylococcus, Klebsiella, Streptococcus, Pseudescherichia, and Acinetobacter. The birth weight and clinical indicators related to prematurity were associated with the CST. We found the composition of the gut microbiota was specific to the different types of low-birth-weight premature infants, namely, ELBW, VLBW, and LBW. The ELBW group exhibited significantly more of the potentially harmful intestinal bacteria Acinetobacter relative to the VLBW and LBW groups, as well as a significantly lower abundance of the intestinal probiotic Bifidobacterium. Based on the gut microbiota's composition and its correlation with low weight, we constructed random forest model classifiers to distinguish ELBW and VLBW/LBW infants. The area under the curve of the classifiers constructed with Enterococcus, Klebsiella, and Acinetobacter was found to reach 0.836 by machine learning evaluation, suggesting that gut microbiota composition may be a potential biomarker for ELBW preterm infants. the gut bacteria of preterm infants showed a CST with Enterococcus, Klebsiella, and Acinetobacter as the dominant genera. ELBW preterm infants exhibit an increase in the abundance of potentially harmful bacteria in the gut and a decrease in beneficial bacteria. These potentially harmful bacteria may be potential biomarkers for ELBW preterm infants.