Epigenetic regulation plays a critical role in controlling fungal secondary metabolism. Here, we report the pleiotropic effects of the epigenetic regulator HdaA (histone deacetylase) on secondary metabolite production and the associated biosynthetic gene clusters (BGCs) expression in the plant endophytic fungus Penicillium chrysogenum Fes1701. Deletion of the hdaA gene in strain Fes1701 induced a significant change of the secondary metabolite profile with the emergence of the bioactive indole alkaloid meleagrin. Simultaneously, more meleagrin/roquefortine-related compounds and less chrysogine were synthesized in the ΔhdaA strain. Transcriptional analysis of relevant gene clusters in ΔhdaA and wild strains indicated that disruption of hdaA had different effects on the expression levels of two BGCs: the meleagrin/roquefortine BGC was upregulated, while the chrysogine BGC was downregulated. Interestingly, transcriptional analysis demonstrated that different functional genes in the same BGC had different responses to the disruption of hdaA. Thereinto, the roqO gene, which encodes a key catalyzing enzyme in meleagrin biosynthesis, showed the highest upregulation in the ΔhdaA strain (84.8-fold). To our knowledge, this is the first report of the upregulation of HdaA inactivation on meleagrin/roquefortine alkaloid production in the endophytic fungus P. chrysogenum. Our results suggest that genetic manipulation based on the epigenetic regulator HdaA is an important strategy for regulating the productions of secondary metabolites and expanding bioactive natural product resources in endophytic fungi.