Fracture-related infection (FRI) is a major challenge in orthopaedic trauma. Understanding of the microbial shift with respect to the initial contamination to infection phase is crucial. This study was to examine the wound microbiota associated with FRI in a prospective cohort study of 155 patients with Gustilo-Anderson Type II, IIIA or IIIB open fractures. Tissue samples were systematically collected from all patients during initial surgical debridement. Out of these, patients who developed infection (FRI group, n = 28) had a second tissue sampling during re-debridement. Conversely, patients who achieved normal healing and subsequently received definitive open reduction and internal fixation served as control (NH group, n = 24). Marked differences between all groups were revealed in the 16S rDNA analysis of microbial communities. The species richness was higher in the Pre-FRI group, but bacterial diversity declined significantly in the FRI group after infection onset. In the Pre-FRI and Pre-NH groups, Firmicutes were the dominating phylum, while in the FRI and NH groups, Proteobacteria and Actinobacteria appeared more prevalent, respectively. In Pre-FRI notably abundant Bacillus and Staphylococcus and in FRI, the most pathogens were Enterobacter and Pseudomonas. The NH group maintained balanced microbial diversity. These findings suggest that declining microbiota diversity and shifts towards dominant pathogens in open fracture patients may serve as early indicators of infection risk, with Bacillus potentially emerging as a predictive biomarker for FRI susceptibility.