A compound for treating cancer, and a pharmaceutically acceptable salt thereof are disclosed. The compound has a structure represented by the following chemical formula (I) or chemical formula (II): wherein X and Y each independently represents formula (a) or formula (b); or R1 and R3 each independently represents a hydrogen atom or an acyl group having a carbon number of 20 or less; R2 represents a hydrogen atom, an acyl group having a carbon number of 20 or less, an alkyl group having a carbon number of 20 or less, an aryl group having a carbon number of 20 or less, and an aralkyl group having a carbon number of 20 or less, a hetero atoms-containing alkyl group having a carbon number of 20 or less; R4 represents a hydrogen atom, an alkyl group having a carbon number of 20 or less carbon, an aryl group having a carbon number of 20 or less carbon, and an aralkyl group having a carbon number of 20 or less, or a hetero atoms-containing alkyl group having a carbon number of 20 or less; and R5 represents an alkyl group having a carbon number of 20 or less, an aryl group having a carbon number of 20 or less, an aralkyl group having a carbon number of 20 or less, and a hetero atoms-containing alkyl group having a carbon number of 20 or less.一種用於治療癌症之化合物、及其醫藥上可接受之鹽類,其係具有以下化學式(I)、或化學式(II)所示之結構:其中,X及Y係各自獨立地表示或;R1及R3係各自獨立地表示氫原子、或碳數20以下之醯基;R2係表示氫原子、碳數20以下之醯基、碳數20以下之烷基、碳數20以下之芳基、碳數20以下之芳烷基、或碳數20以下之含雜原子烷基;R4係表示氫原子、或碳數20以下之烷基、碳數20以下之芳基、碳數20以下之芳烷基、或碳數20以下之含雜原子烷基;R5係表示碳數20以下之烷基、碳數20以下之芳基、碳數20以下之芳烷基、碳數20以下之含雜原子烷基。