A new peroxide of xanthone (1), together with five analogues (2–6), was obtained from horseradish peroxidase (HRP) catalysed biotransformation of α-mangostin. In order to increase the yield of compound 1, the environmental pH was succinctly adjusted, and as a result, compound 1 was formed with considerable selectivity. The anticancer potential of compound 1, a pentacyclic xanthone with a 1,2-dioxolane ring, was investigated due to its potent cytotoxic activity. The results showed that apoptosis induced by compound 1 in human hepatocellular carcinoma (HepG2) cell was associated with activation of caspase-dependent apoptotic pathway, the generation of reactive oxygen species (ROS) and the activation of c-Jun N-terminal kinases (JNK). In summary, compound 1 with a peroxide group was biosynthesized in considerable yield through pH-switched biotransformation catalysed by HRP, which could be further developed as a promising candidate in the treatment of liver cancer.