Cancer cells prefer to metabolize glucose through aerobic glycolysis, known as the Warburg effect. It plays a crucial role in proliferation and progression of cancer cells. However, the complete mechanism remains elusive. In recent studies, the signal transducer and activator of transcription 3 (STAT3) signaling has been discovered to have roles in cancer‑associated changes in metabolism. In this study, we find that the ginsenoside 20(S)‑Rg3, a pharmacologically active component of the traditional Chinese herb Panax ginseng, inhibits glycolysis in ovarian cancer cells by regulating hexokinase 2 (HK2) and pyruvate kinase M2 (PKM2). We also show that 20(S)‑Rg3 regulates HK2 through downregulation of p‑STAT3 (Tyr705). Furthermore, overexpression of STAT3 in ovarian cancer cells weakened the suppression of Warburg effect induced by 20(S)‑Rg3. Importantly, 20(S)‑Rg3 treatment represses HK2 expression in nude mouse xenograft models of ovarian cancer. Taken together, our results show that 20(S)‑Rg3 inhibits the Warburg effect by targeting STAT3/HK2 pathway in ovarian cancer cells, highlighting the potentiality of 20(S)‑Rg3 to be used as a therapeutic agent for ovarian cancer.