A new alternariol derivative, 2240B (1), together with alternariol (2), alternariol 4,10-dimethyl ether (3), and alternariol 4-methyl ether (4), was isolated from the ethyl acetate extract of the liquid medium GYT of No. 2240, the mangrove endophytic fungus from the South China Sea Coast. The structure of compound 1 was unambiguously elucidated as alternariol 4-methyl-10-acethyl ester by spectra including one/two-dimensional NMR, HREIMS, IR, and UV. The structures of compounds 2–4 were also established by spectroscopic analyses and comparison with related literature data. The anticancer tests showed that compounds 2 and 4 had strong activities against KB and KBv200 cells with IC50 values of 3.17, 3.12, and 4.82, 4.94 µg/mL, while compounds 1 and 3 exhibited weak activities against the two kinds of tumor lines with IC50 values of more than 50 µg/mL.