The present invention relates to a chemical and pharmaceutical technology, and in particular to a STAT3 and ERK signal pathway inhibitor and a use thereof. The present invention provides a STAT3 and ERK signal pathway inhibitor. The inhibitor mainly consists of a mogroside and/or an analog thereof. The mogroside and the analog thereof inhibit the phosphorylation of a transcription factor STAT3 and the phosphorylation of an ERK. The method for preparing the mogroside and the analog has the characteristics of simpleness, strong operability and high purity of products. The present invention furtherprovides a use of the STAT3 and ERK signal pathway inhibitor in the preparation of drugs for treating tumors, which realizes the purposes of inhibiting the proliferation of cancer cells and promoting the apoptosis of cancer cells and has a very good inhibition effect on cancers.