The continuous burden of human immunodeficiency virus-1 in Sub-Saharan Africa, coupled with the inability of antiretroviral agents to eradicate HIV-1 from viral reservoirs, the potential risks of drug resistance development, and the development of adverse effects, emphasizes the need to develop a new class of HIV-1 inhibitors. Here, we cultivated four endophytic fungal isolates from a medicinal plant,Albizia adianthifoliawith the addition of small epigenetic modifiers, sodium butyrate, and valproic acid, to induce the expression of biosynthetic gene clusters encoding active secondary metabolites with probable anti-HIV activities. We identified a non-toxic crude extract of the endophytic fungusPenicillium chrysogenumtreated with sodium butyrate to possess significantly greater anti-HIV activity than the untreated extracts.Penicillium chrysogenumP03MB2 showed anti-HIV activity with an IC50of 0.6024 µg/mL compared to untreated fungal crude extract (IC505.053 µg/mL) when treated with sodium butyrate. The profile of secondary metabolite compounds from the bioactive, partially purified extracts were identified by gas chromatography-mass spectrometry (GC-MS), and more bioactive compounds were detected in treatedP. chrysogenumP03MB2 fractions than in untreated fractions. Pyrrolo[1,2-a]pyrazine-1,4-dione, hexahydro (13.64%), cyclotrisiloxane, hexamethyl (8.18%), cyclotetrasiloxane, octamethyl (7.23%), cyclopentasiloxane, decamethyl (6.36%), quinoline, 1,2-dihydro-2,24-trimethyl (5.45%), propanenitrile (4.55%), deca-6,9-diene (4.55%), dibutyl phthalate (4.55%), and silane[1,1-dimethyl-2-propenyl)oxy]dimethyl (2.73%) were the most abundant compounds. These results indicate that treatment of endophytic fungi with small epigenetic modifiers enhances the secretion of secondary metabolites with stronger anti-HIV-1 properties, acknowledging the feasibility of epigenetic modification as an innovative approach for the discovery of cryptic fungal metabolites which can be developed into therapeutic compounds.