The asexual forms of the malaria parasite Plasmodium falciparum are adapted for chronic persistence in human red blood cells, continuously evading host immunity using epigenetically regulated antigenic variation of virulence-associated genes. Parasite survival on a population level also requires differentiation into sexual forms, an obligatory step for further human transmission. We reveal that the essential nuclear gene, P. falciparum histone deacetylase 2 (PfHda2), is a global silencer of virulence gene expression and controls the frequency of switching from the asexual cycle to sexual development. PfHda2 depletion leads to dysregulated expression of both virulence-associated var genes and PfAP2-g, a transcription factor controlling sexual conversion, and is accompanied by increases in gametocytogenesis. Mathematical modeling further indicates that PfHda2 has likely evolved to optimize the parasite's infectious period by achieving low frequencies of virulence gene expression switching and sexual conversion. This common regulation of cellular transcriptional programs mechanistically links parasite transmissibility and virulence.