This study aimed to explore the distribution of intestinal and pharyngeal microbiota on the first day of life in preterm infants and compare the composition of microbiota in infants delivered by cesarean section or vaginally. This study included 44 late preterm infants with a gestational age of 34-36 + 6 weeks. Stool and throat swab samples were collected from the preterm infants on the first day of life. The infants were divided into cesarean section and vaginal delivery groups. Illumina NovaSeq high-throughput sequencing technology was used to sequence the V3-V4 hypervariable region of the 16S rRNA gene of all bacteria in the samples. Venn diagram was used to identify shared operational taxonomic units (OTUs) in the intestines and pharynges. Microbial analysis was conducted at the phylum and genus levels, and α and β diversity comparisons were performed. (1) Gestational age may have significantly affected the microbial colonization of the intestines and pharynges of preterm infants on the first day after birth (p ≤ 0.001). (2) More OTUs were detected in the pharynx than in the intestines, both have a total of 819 shared OTUs. Proteobacteria, Firmicutes, and Bacteroidota were the dominant phyla in both. At the genus level, Streptococcus had a lower relative abundance in stool samples (0.5%) compared to throat samples (0.5% vs. 22.2%, p = 0.003). 3) The relative abundance of Streptococcus in pharyngeal samples was 26.2% in the cesarean section group much higher than the 3.8% in the vaginal delivery group (p = 0.01). The early postnatal period is a critical time for the establishment of an infant's microbiota. Gestational age at birth may influence microbial colonization, while birth weight, gender, and mode of delivery do not. The intestinal and pharyngeal microbiota composition of preterm infants on the first day after birth showed high similarity, but larger samples are needed for further validation.