The diversity of phyllosphere bacteria is one of the hotspots in the research area of plant-microbial relationship. There are still a lot of controversies in the main factors influencing community structure of phyllosphere bacteria. In this study, the phyllosphere bacterial community structure of Osmanthus fragrans and Nerium indicum grown in three habitats was investigated based on high-throughput sequencing and the main driving factors were examined. The results showed that there was no significant difference in phyllosphere bacterial diversity between the two plant species grown in three habitats. For phyllosphere bacterial community of two plant species from three habitats, the dominant phyla were Actinobacteria, Bacteroidetes, Chlamydiae, Cyanobacteria, Firmicutes and Proteobacteria, and the dominant genera included Methylobacterium, Sphingomonas, Hymenobacter, Polaromonas and Spirosoma. The structure of phyllosphere bacterial community was influenced by habitats, host species identity and species-habitat interaction, among which habitat showed the strongest effect.