Oxidative stress plays an important role in the pathology of liver disorders. Total C‑21 steroidal glycosides (TCSGs), isolated from the root tuber of Cynanchum auriculatum Royle ex Wight, have been reported to exert numerous effects, including liver protective and antioxidant effects. In order to investigate the potential mechanisms underlying the protective effects of TCSGs on liver function, the present study used the human normal liver cell line, L02, to evaluate the effects of TCSGs on hydrogen peroxide (H2O2)‑induced oxidative injury and inflammatory responses. The L02 cells were pretreated with various concentrations of TCSGs, followed by exposure to 1.5 mM H2O2. Cell viability was determined by a 3‑(4,5‑dimethylthiazol‑2‑yl)‑2,5‑diphenyltetrazolium bromide (MTT) assay. The levels of alanine aminotransferase (ALT), aspartate aminotransferase (AST), lactate dehydrogenase (LDH) and nitric oxide (NO) were measured using colorimetric assays. The activities of superoxide dismutase (SOD), catalase (CAT), glutathione peroxidase (GSH‑Px) and the production of malondialdehyde (MDA) were also determined. Intracellular reactive oxygen species (ROS) levels were detected using a fluorescent probe. H2O2‑induced oxidative toxicity was attenuated following treatment with TCSGs, as indicated by the increase in cell viability, the decreased levels of ALT, AST, LDH, NO, MDA and ROS, and the increased activities of SOD, CAT and GSH‑Px. To further explore the possible mechanisms of action of TCSGs, the nuclear factor erythroid 2‑related factor 2 (Nrf2) and nuclear factor‑κB (NF)‑κB pathways were examined. The results revealed that treatment with TCSGs markedly induced Nrf2 nuclear translocation and upregulated the expression of heme oxygenase‑1 (HO‑1) in the L02 cells damaged by H2O2. In addition, pretreatment with TCSGs inhibited the NF‑κB signaling pathway by blocking the degradation of the inhibitor of nuclear factor κBα (IκBα), thereby reducing the expression and nuclear translocation of NF‑κB, as well as reducing the expression of tumor necrosis factor‑α (TNF‑α), interleukin-6 (IL‑6), inducible nitric oxide synthase (iNOS) and cyclooxygenase 2 (COX‑2). On the whole, the findings of this study demonstrate that TCSGs can protect L02 cells against H2O2‑induced oxidative toxicity and inflammatory injury by increasing the expression of Nrf2 and HO‑1, mediated by the NF‑κB signaling pathway.