Ovarian cancer is a serious threat to women's health and safety. So far, people have discovered more than 130 small molecule compounds of natural origin for anti-tumor, of which approximately 50% are of microbial origin. The Acanthus ilicifolius L. species is primarily distributed in the Guangdong, Hainan, and Guangxi regions of China and grows in tidally accessible coastal areas. Recent studies have revealed that Acanthus ilicifolius L. extracts are endowed with a range of pharmacological properties, including anti-inflammatory, hepatoprotective, antioxidant, and antitumor activities. Endophytic fungi are commonly found in the healthy tissue and organs of medicinal plants. These fungi and the plants they inhabit form mutually beneficial symbiotic relationships. Endophytic fungi produce a series of secondary metabolites, with active substances having shown great economic value and applications prospects in drug research and development as well as for the biological control of plant diseases. Secondary metabolites production by endophytic fungi is regulated by specific gene clusters, and several techniques have been used to stimulate the secondary metabolic processes of fungi, including epigenetic-modification and OSMAC (one strain many compounds) strategies, co-culturing, and gene modification. Among these, epigenetic modification has been shown to be effective; this strategy involves the addition of small-molecule epigenetic modifiers to the culture medium, thereby activating silenced biosynthetic gene clusters without altering the DNA sequences of the fungi. This approach facilitates the expression of silenced genes in endophytic fungi, thereby increasing the number and diversity of secondary metabolites. Furthermore, it assists in overcoming the inhibition of microbial secondary-metabolite synthesis under laboratory conditions, and enhances silenced-gene expressions. The advent of novel analytical techniques and bioinformatics has provided a comprehensive, multifaceted, and holistic understanding of fungal metabolism through the development of metabolomics as a research platform. However, few studies have combined anti-ovarian cancer-activity screening with metabolomic approaches in the search for activity-differentiating metabolites from endophytic fungi under the intervention of epigenetic modifiers. Herein, we investigated the impact of epigenetic modifiers on the secondary metabolites of the endophytic Diaporthe goulteri fungus from Acanthus ilicifolius L. to determine their potential anti-ovarian cancer activities. Crude extracts were obtained by controlling three variables: the number of fermentation days, the type of epigenetic modifier, and its concentration, with activities screened using the CCK-8 (cell counting kit-8) method. Ultra performance liquid chromatography-tandem mass spectrometry (UPLC-MS/MS) was subsequently employed for non-targeted metabolomic analysis. A multivariate statistical analysis model was constructed using principal component analysis and orthogonal partial least squares-discriminant analysis, which combines model and variable importance projection, with qualitative screening performed and significant changes (variable importance in the projection (VIP)≥1; P<0. 05) determined. Fifteen differential metabolites were identified in the fungal and epigenetic modification group, primarily comprising polyketides, amino acids, derivatives, alkaloids, and organic acids, including prenderol, glycine, valine, 2-ethylcaproic acid, rubratoxin B, finasteride, 6-silaspiro[5.5]undecane, 1-(2-nitrophenoxy)octane, heptadecene, 1-pentadecene, 11-ketoetiocholanolone, 3-(1-ethyl-1,3,3-trimethyl-2,3-dihydro-1H-inden-5-yl)butanal, N2-benzoylarginine, tabutrex, (3aR,6S,6aS)-6-(4-hydroxy-2-methoxy-2-butanyl)-4,4-dimethylhexahydro-1(2H)-pentalenone, and 8-aminoquinoline. The expressions of prenderol, 1-(2-nitrophenoxy)octane, 3-(1-ethyl-1,3,3-trimethyl-2,3-dihydro-1H-inden-5-yl)butanal, N2-benzoylarginine, and 8-aminoquinoline were downregulated, whereas the expressions of the remaining 10 substances were upregulated. Polyketides were the main components that exhibited higher expressions. This study showed that latent active differential metabolites can be searched by combining anti-ovarian cancer-activity screening with metabolomics analysis, thereby providing a reference for the further development of Acanthus ilicifolius L. resources and the subsequent targeted isolation of active compounds.