AIM: This study investigated the correlation between microbiota of caries-free enamel and caries-affected dentine biofilms and that of root canals with primary apical periodontitis, by using an Illumina MiSeq platform. METHODOLOGY: Biofilm from caries-free enamel surface (Biofilm-C) or caries-affected dentine (Biofilm-E) and root canal paper point samples (Canal) were collected from 31 teeth with primary apical periodontitis. Microbial composition was analysed by amplicon sequencing that targeted the V3-V4 region of 16S rRNA gene. Alpha and beta diversities of bacterial communities between sampling sites were compared using the Kruskal-Wallis test and pairwise permutational multivariate analysis of variance, respectively. Differentially abundant taxa identified using MaAsLin2 were adjusted for multiple comparisons using the Benjamini-Hochberg method. RESULTS: Totals of 16 phyla, 130 genera and 314 species were identified. Distinct and shared bacterial communities were observed between biofilm and canal samples. No significant differences in alpha diversity were observed across all sampling sites. A total of 32 genera including Acinetobacter, [Eubacterium], Dialister, Erysipelotrichaceae UCG-006, Lawsonella, W5053, Phocaeicola, Mogibacterium, Pyramidobacter and Parvimonas were more abundant in Canal samples compared to both Biofilm-C and Biofilm-E. The genera Hallella, Lactobacillus, Shuttleworthella, Olsenella, Cryptobacterium, Alloprevotella, Phocaeicola, Limosilactobacillus, Selenomonadaceae and Anaeroglobus were increased significantly in Biofilm-E compared to Biofilm-C. Hallela multisaccharivorax, Olsenella uli, Lactobacilllus gasseri, Selenomonadaceae species and Scardovia inopinata exhibited higher abundance in both Biofilm-E and Canal, than Biofilm-C. These differences in bacterial composition among sampling sites, including the increased presence of specific taxa in caries-affected dentine and root canals, suggest that these microorganisms may contribute to the development of primary apical periodontitis. CONCLUSION: Bacterial community structure differed significantly between biofilm and root canal samples, but showed no significant differences among biofilm samples based on dental caries status. However, some taxa were shared among caries-affected lesions, including dentine and root canals. H. multisaccharivorax, O. uli, L. gasseri, Selenomonadaceae species and S. inopinata exhibited higher abundance in caries-affected dentine and root canals with primary apical periodontitis, suggesting that specific bacteria in caries-affected dentine play a crucial role in the development of root canal infections and the pathogenesis of primary apical periodontitis.