The invention relates to a preparation method of a molecular imprinting solid phase extraction film with a triphenylmethane molecule replacing malachite green, and application. The triphenylmethane molecule is adopted as a substituted template molecule for the malachite green for preparing the molecular imprinting film, so that the problems of high template molecule cost, leakage of the template molecule during use and the like during the preparation of a molecular imprinting polymer are solved, and meanwhile, the identification ability of a molecular imprinting is still kept. The method provided by the invention is stable in polymerization reaction without side reaction products, and the reaction is easy to control; the malachite green molecular imprinting film prepared through the method is stable in physicochemical property, high in selectivity and fast in mass transfer rate, not only can be combined with an instrument method (i.e. liquid chromatogram, liquid chromatogram-mass spectrometer, etc.), but also can be combined with a fast detection method (i.e. euzymelinked immunosorbent assay, colloidal gold immunization, a rapid detection kit method, etc.), and is suitable for separating, extracting and enriching the malachite green with trace concentration in a complex sample.