Subergorgic acid (1), a cyclopentapentalane sesquiterpenoid and potential reversible cholinesterase inhibitor, and its analogue 2-deoxy-2 beta-hydroxysubergorgic acid (2) were first isolated from soft coral-associated symbiotic and epiphytic fungus Aspergillus sp. EGF15-0-3. Their structures were established by NMR and HRESIMS spectroscopic data. According to the strategy of one strain many compounds (OSMAC) and eutrophic culture, Global Natural Products Molecular Networking (GNPS) was applied to detect the presence of compounds 1 and 2 in 23 different media for optimal medium compositions. As a result, compound 1 was found in 6 different media besides potato dextrose broth (PDB) medium, the contents of 2 were different in the solid and liquid media, and the best medium for compounds 1 and 2 was GPY+CaCO3. It was demonstrated that the soft coral-associated symbiotic and epiphytic fungus Aspergillus sp. EGF15-0-3 was the microbiological producer of compounds 1 and 2. This work provided strong evidence to support the hypothesis that novel and bioactive secondary metabolites produced by marine invertebrates often come from endogenetic, epiphytic, symbiotic or environmental microorganisms.