Phanera championii is a medicinal liana plant that has successfully adapted to hostile karst habitats. Despite extensive research on its medicinal components and pharmacological effects, the molecular mechanisms underlying the biosynthesis of critical flavonoids and its adaptation to karst habitats remain elusive. In this study, we performed high-coverage PacBio and Hi-C sequencing of P. championii, which revealed its high heterozygosity and phased the genome into two haplotypes: Hap1 (384.60 Mb) and Hap2 (383.70 Mb), encompassing a total of 58 612 annotated genes. Comparative genomes analysis revealed that P. championii experienced two whole-genome duplications (WGDs), with approximately 59.59% of genes originating from WGD events, thereby providing a valuable genetic resource for P. championii. Moreover, we identified a total of 112 genes that were strongly positively selected. Additionally, about 81.60 Mb of structural variations between the two haplotypes. The allele-specific expression patterns suggested that the dominant effect of P. championii was the elimination of deleterious mutations and the promotion of beneficial mutations to enhance fitness. Moreover, our transcriptome and metabolome analysis revealed alleles in different tissues or different haplotypes collectively regulate the synthesis of flavonoid metabolites. In summary, our comprehensive study highlights the significance of genomic and morphological adaptation in the successful adaptation of P. championii to karst habitats. The high-quality phased genomes obtained in this study serve as invaluable genomic resources for various applications, including germplasm conservation, breeding, evolutionary studies, and elucidation of pathways governing key biological traits of P. championii.