Hydroxysafflor yellow A (HSYA) is a water-soluble component of the safflower (Carthamus tinctorius), and research has revealed that HSYA exhibits antitumor effects. In the present study, the effects of HSYA on the autophagy of a Hep-G2 liver cancer cell line, as well as the underlying mechanisms, were investigated. Hep-G2 cells were treated with HSYA and the viability of cells was measured using an MTT assay. Western blotting and immunofluorescence assays were performed to determine the expression of light chain 3 II (LC3-II) and p62, as well as the autophagy regulators Beclin 1 and ERK1/2. Transmission electron microscopy was performed to observe the formation of autophagosomes. The combined effects of HSYA and the autophagy inhibitor chloroquine (CQ) were also determined. The results revealed that the viability of Hep-G2 cells decreased with increasing concentrations of HSYA. Furthermore, LC3-II expression increased significantly and the level of p62 decreased significantly in the HYSA group compared with the control group. Additionally, an increase in Beclin 1 expression and a decrease in phosphorylated-ERK1/2 expression was observed in Hep-G2 cells treated with HYSA. Following treatment with CQ and HSYA, a significant increase in the viability of Hep-G2 cells was observed compared with the HSYA group. Collectively, the results indicated that HSYA induced autophagy by promoting the expression of Beclin 1 and inhibiting the phosphorylation of ERK in liver cancer cells. Therefore, HSYA may serve as a potential therapeutic agent for liver cancer.