Ursolic acid and oleanolic acid are isomers and they both belong to the compound of pentacyclic triterpenoids. They show many biological activities, such as anti-tumor, anti-HIV, anti-inflammatory, hypoglycemic, hepatoprotective, antimalarial and many other kinds of pharmacological effects. We take the natural product ursolic acid and oleanolic acid which with biological activity as the lead compounds for modifying their structures in this paper, four novel ursolic acid and oleanolic acid derivatives were designed and synthesized through methyl esterification at C-28 of ursolic acid and oleanolic acid, and introducing D-phenylglycine at C-3. Structures of all target compounds were confirmed by IR and 1H NMR. These compounds were tested anticancer activity, which were human glioma cell U87△GEFR and human lung cancer cells PC9/G. The results showed that U-3 displayed higher inhibitory activity than ursolic acid and oleanolic acid for these two kinds of cancer cells.