Liberibacter pathogens are the causative agents of several severe crop diseases worldwide, including citrus Huanglongbing and potato Zebra Chip. These bacteria are endophytic and non-culturable, making experimental approaches challenging and highlighting the need for bioinformatic analysis in advancing our understanding about Liberibacter pathogenesis. Here, we performed an in-depth comparative phylogenomic analysis of Liberibacter pathogens and their free-living, nonpathogenic, ancestral species, aiming to identify major genomic changes and determinants associated with their evolutionary transitions in living habitats and pathogenicity. We found that prophage loci represent the most variable regions among Liberibacter genomes. Using gene neighborhood analysis and phylogenetic classification, we systematically recovered, annotated, and classified all prophage loci into four types, including one previously unrecognized group. We showed that these prophages originated through independent gene transfers at different evolutionary stages of Liberibacter and only the SC-type prophage was associated with the emergence of the pathogens. Using ortholog clustering, we identified two additional sets of genomic genes, either lost or gained in the ancestor of the pathogens. Consistent with the habitat change, the lost genes were enriched for biosynthesis of cellular building blocks. Importantly, among the gained genes, we uncovered several previously unrecognized toxins, including a novel class of polymorphic toxins, a YdjM phospholipase toxin, and a secreted EEP protein. Our results substantially extend the knowledge on the evolutionary events and potential determinants leading to the emergence of endophytic, pathogenic Liberibacter species and will facilitate the design of functional experiments and the development of new detection and blockage methods of these pathogens.