High‐performance liquid chromatography analysis of the ethyl acetate fraction of Paeonia lactiflora roots led to the detection of five compounds: gallic acid (GA) (1), methyl gallate (2), albiflorin (4), paeoniflorin (5), and pentagalloylglucose (6). Among them, pentagalloylglucose (6) showed cytotoxicity against human breast cancer cells MCF‐7 and MDA‐MB‐231 in vitro with IC50 values of 20.1 and 14.4 μM, respectively. Through the structure–activity relationship of GA, which is an important backbone of pentagalloylglucose, we found that its three hydroxy groups were important for its cytotoxicity, and that the 3‐O‐methylgallic acid structure was only effective against a triple‐negative breast cancer cell line. Furthermore, drug efficacy was confirmed by increasing its lipid affinity through the synthesis of various ester derivatives of gallic acid.