The development of the gut is controlled and modulated by different interacting mechanisms, such as genetic endowment, intrinsic biological regulatory functions, environment influences and last but no least, the diet influence. In this work, we compared the fecal microbiota of breast-fed (BF), formula-fed (FF), and mixed-fed (MF) infants from Hebei Province, China. By using high-throughput 16S rDNA sequencing analyses, we found some differences in gut microbiota in the three groups. Firmicutes and Proteobacteria were the dominant bacteria at the phylum level in the three groups, where FF infants showed a significant depletion in Bacteroidetes (p < 0.001) and Actinobacteria (p < 0.05). Enterobacteriaceae was the dominant bacteria at the family level in the three groups, but FF infants showed higher Enterobacteriaceae enrichment than BF and MF infants (p < 0.05); the abundance of the Bifidobacteriaceae was only 8.16% in the feces of BF infants, but higher than in MF and FF infants (p < 0.05). The number of genera detected (abundance >0.01%) in BF, MF, and FF infants was only 15, 16, and 13, respectively. This study could provide more accurate and scientific data for the future study of infant intestinal flora.