The invention discloses an organic electrochemical transistor sensor based on a molecular imprinted membrane, characterized in that a gate electrode of the organic electrochemical transistor sensor adopts a gold electrode modified with the molecular imprinted membrane, and the gate electrode is obtained by that an object to be detected is used as a template molecule, the template molecule is polymerized with a corresponding functional monomer by cyclic voltammetry to form a polymer membrane on the surface of the gold electrode firstly, and then the template molecule in the polymer template is eluted; and the gate electrode regulates and controls the channel current between a source electrode and a drain electrode through the solution of the object to be tested to constitute the organic electrochemical transistor sensor for selectively recognizing the object to be detected. The invention combines the molecular imprinting technique with the organic electrochemical transistor device, uses the specificity selection of the molecular imprinting technique and the signal amplification function of the organic electrochemical transistor sensor to recognize the specificity of the object to be detected, can selectively absorb the micro and even trace object to be detected, and has good selectivity, high sensitivity and low detection limit.