Endophytic bacteria are important for plant growth, stress tolerance and metabolite synthesis. Camellia oleifera is a unique woody oil crop in China, and the bacterial communities at different niches have not been fully reported. To investigate the structural characteristics and diversity of bacterial communities in different niches of C. oleifera, we applied high-throughput sequencing technology on the Illumina MiSeq platform to explore the diversity of bacteria species in roots, stems, leaves, inter-rhizosphere soils and non-rhizosphere soils of C. oleifera. We obtained 3,127 OTUs (operational taxonomic units) from five samples, belonging to 16 phyla, 58 orders, 91 families, 162 families and 249 genera; the abundance and diversity of bacterial communities in different niches of C. oleifera decreased from bottom to top; the absolute dominant species in different tissues of C. oleifera were the same at different levels except for soil, and there were specific bacterial communities in roots and stems of C. oleifera. The KEGG functional predictions revealed that endophytic bacteria were involved in a variety of metabolic pathways, including functional information related to human diseases. The structure and diversity of endophytic bacterial communities in different niches of C. oleifera showed a bottom-up filtering selection mechanism, and the bacterial communities in different niches differed significantly in structure and functional information, providing favourable information for the functional use of endophytic bacteria and the exploitation of new beneficial microbial resources, which is worth further research and exploitation.