Background: Studies of microbiota composition of infants with small intestinal ostomy due to various etiologies are limited. Here, we characterized the intestinal microbiota of infants with ileostomy resulting from distinct primary diseases. Methods: Fifteen patients with necrotizing enterocolitis, eight patients with meconium peritonitis, and seven patients with Hirschsprung's disease were included in the study. The small intestinal microbiota composition in infants with ileostomy caused by these diseases was studied. Results: Microbial diversity in infantile ileostomy fluid was generally low, and was dominated by members of the Proteobacteria and Firmicutes phyla. At the genus level, the most abundant were Klebsiella, Escherichia-Shigella, Streptococcus, Clostridium sensu stricto 1, Enterococcus, and Lactobacillus. Streptococcus and Veillonella are related to carbohydrate metabolism and immunity, and breastfeeding can increase the proportion of these potentially beneficial bacteria. The proportion of Bifidobacterium in the breastfeeding group was higher than that in the non-breastfeeding group, and incidence of colitis and sepsis was significantly reduced in the breastfeeding group. The increase in body weight in the breastfeeding group was observed to be higher than in the non-breastfeeding group. Conclusions: Excessive Klebsiella and Escherichia-Shigella and low abundance of Streptococcus, Veillonella and Faecalibacterium suggests that the small intestinal microbiota is in an unhealthy state after ileostomy. However, Streptococcus, Faecalibacterium, and Veillonella species were frequently present, suggesting that expansion of these bacteria might assist the development of the immune system after surgery.