The invention belongs to the field of molecular imprinting sensor field, and more specifically relates to a method used for photocatalysis RAFT polymerization preparation of a molecular imprinting sensor. The method mainly comprises following steps: a compound containing a tertiary amine structure is taken as a template molecule, and a template molecule-functional monomer pre-polymerized solutionis synthesized; tris (bipyridine) ruthenium is taken as both as a photocatalyst and an electrochemiluminescence agent, photocatalysis RAFT polymerization is carried out, and synthesis of a molecular imprinting polymer with a structure and a size similar to those of the template molecule is realized; and at last, a molecular imprinting sensor is obtained. The molecular imprinting sensor is high inspecific identifying capacity, can be used for quantitative determination, and the lowest detection lower limit concentration reaches 1*10<-13>mol / L. According to the preparation method, no extra polymerization initiator is needed, the process is more simple, is high in efficiency, is green, and is friendly to the environment.