Distyly, a floral dimorphism that promotes outcrossing, is controlled by a hemizygous genomic region known as the S‐locus. Disruptions of genes within the S‐locus are responsible for the loss of distyly and the emergence of homostyly, a floral monomorphism that favors selfing. Using whole‐genome resequencing data of distylous and homostylous individuals from populations of Primula vulgaris and leveraging high‐quality reference genomes of Primula we tested, for the first time, predictions about the evolutionary consequences of transitions to selfing on S‐genes. Our results reveal a previously undetected structural rearrangement in CYPᵀ associated with the shift to homostyly and confirm previously reported, homostyle‐specific, loss‐of‐function mutations in the exons of the S‐gene CYPᵀ. We also discovered that the promoter and intronic regions of CYPᵀ in distylous and homostylous individuals are conserved, suggesting that down‐regulation of CYPᵀ via mutations in its promoter and intronic regions is not a cause of the shift to homostyly. Furthermore, we found that hemizygosity is associated with reduced genetic diversity in S‐genes compared with their paralogs outside the S‐locus. Additionally, the shift to homostyly lowers genetic diversity in both the S‐genes and their paralogs, as expected in primarily selfing plants. Finally, we tested, for the first time, long‐standing theoretical models of changes in S‐locus genotypes during early stages of the transition to homostyly, supporting the assumption that two copies of the S‐locus might reduce homostyle fitness.