Pitaya contains various types of polyphenols, flavonoid and vitamins which are beneficial for health and it is among the most important commercial tropical fruits worldwide. Endophytic bacteria might be beneficial for plant growth and yield. However, bacterial diversity in pitaya is poorly characterized. In this study, fruits of white and red pitayas from three different origins (Thailand, Vietnam and China) were chosen for endophytic bacteria diversity investigation by using Illumina HiSeq second-generation high-throughput sequencing technology. Large number of endophytic bacteria were detected and 22 phyla, 56 classes, 81 orders, 122 families and 159 genera were identified. Endophytic bacteria diversity was uneven among pitaya fruits from different origins and bacteria structure was different between white pitaya group and red pitaya group. Phylum Bacteroidetes, classes Bacteroidia and Coriobacteriia, orders Bacteroidales and Coriobacteriales, families Prevotellaceae, Bacteroidaceae, Ruminococcaceae, Paraprevotellaceae, Rikenellaceae, Alcaligenaceae and Coriobacteriaceae, genera