To prevent citrus decay caused by Geotrichum citri-aurantii, 12 natural products were isolated from two endophytic fungi, in which cytosporone B was shown to have excellent bioactivity for control of G. citri-aurantii with median effect concentration (EC50) of 26.11 μg/mL and minimum inhibitory concentration (MIC) of 105 μg/mL, and also significantly reduced the decay of sugar orange during the in vivo trials. In addition, cytosporone B could alter the morphology of G. citri-aurantii by causing distortion of the mycelia and loss of membrane integrity. Differentially expressed genes (DEGs) between cytosporone B-treated and -untreated samples were revealed by Illumina sequencing, including 3540 unigenes. Gene Ontology (GO) and Kyoto Encyclopedia of Genes and Genomes (KEGG) analyses showed that most DEGs were related to metabolic production and cell membrane. These findings suggest cytosporone B is a promising biological preservative to control citrus decay and reveal the action mechanism of cytosporone B in relation to the destruction of the fungal cell membrane at both morphological and molecular levels.