The invention discloses a method for separating cucurbitacin B from muskmelon vines by virtue of catalytic reaction. The method comprises the following steps: an extraction process, namely taking 1 part of the muskmelon vines, soaking by using ethanol, performing reflux extraction, and filtering and concentrating an extracting solution to obtain an extract; the catalytic reaction, namely adding concentrated hydrochloric acid into the extract, then adding ferric trichloride hexahydrate, stirring and reacting, cooling to the room temperature, filtering, performing water rinsing, and drying; a refining process, namely stirring and dissolving a crude product by using ethyl acetate, then adding activated carbon, decoloring, concentrating to a small volume, and standing overnight to perform crystallization; a recrystallization process, namely dissolving a like fine product by using ethanol, filtering and concentrating to a small volume while hot, standing overnight to perform crystallization, and filtering; and putting the fine product in a vacuum drying box, and drying for 8 hours to obtain a cucurbitacin B fine product. The method disclosed by the invention is wide in raw material source and low in production cost, and can be used for reducing the damages of an acid environment to cucurbitacin B; the production rate reaches more than 60%, the purity is more than 99.0%, and the wastewater BOD (biochemical oxygen demand) is less than 100; the method is suitable for the industrial production of recycling water, and can be widely applied to plant extraction industries.