Comparative and pan-genomic analyses of the endophytic fungus Pezicula neosporulosa (Helotiales, Ascomycota) from needles of the relict fir, Abies beshanzuensis, showed expansions of carbohydrate metabolism and secondary metabolite biosynthetic genes characteristic for unrelated plant-beneficial helotialean, such as dark septate endophytes and ericoid mycorrhizal fungi. The current species within the relatively young Pliocene genus Pezicula are predominantly saprotrophic, while P. neosporulosa lacks such features. To understand the genomic background of this putatively convergent evolution, we performed population analyses of 77 P. neosporulosa isolates. This revealed a mosaic structure of a dozen non-recombining and highly genetically polymorphic subpopulations with a unique mating system structure. We found that one idiomorph of a probably duplicated mat1-2 gene was found in putatively heterothallic isolates, while the other co-occurred with mat1-1 locus suggesting homothallic reproduction for these strains. Moreover, 24 and 81 genes implicated in plant cell-wall degradation and secondary metabolite biosynthesis, respectively, showed signatures of the balancing selection. These findings highlight the evolutionary pattern of the two gene families for allowing the fungus a rapid adaptation towards endophytism and facilitating diverse symbiotic interactions.