The invention aims to provide a material for preparing a molecular imprinted polymer by taking luteolin as a template and adopting a molecular imprinting technique method, and a method for separating and purifying the luteolin in a natural product, and belongs to the field of separation and purification of effective components from the natural product. The method comprises the following steps: (1) crude extraction, namely sequentially washing, drying, crushing and sieving peanut shells, extracting the peanut shell powder with 70 percent ethanol time by time under the assistance of ultrasonic waves, and concentrating and drying the extract; (2) preparation of the polymer, namely weighing the pure luteolin, a functional monomer, a cross-linking agent and an initiating agent in proportion, dissolving the materials in a solvent, performing ultrasonic processing, degassing and polymerization on the solution to obtain the block polymer, and sequentially grinding, sieving and eluting the block polymer to obtain the molecular imprinted polymer of the luteolin; and (3) purification, namely loading the prepared molecular imprinted polymer into a solid-phase extraction column, loading the crude extract, washing off the luteolin left on the column after removing impurities by eluting, concentrating and drying the luteolin to obtain the pure product of the luteolin.