The invention discloses a preparation method and application of a conductive hydrogel capable of slowly releasing drugs and factors. The preparation method comprises the following steps: step 1, a conductive macromolecular monomer solution is prepared, an oxidant is added, and after sufficient reaction, a conductive macromolecular polymer is obtained; step 2, a concentrated aqueous dopamine solution is prepared, the conductive macromolecular polymer obtained in step 1 is added, and after sufficient reaction, a polydopamine/conductive macromolecular polymer compound is obtained; step 3, a metalion salt solution and an organic ligand solution are prepared; step 4, the polydopamine/conductive macromolecular polymer compound is added into the metal ion salt solution, and after uniform mixing,the organic ligand solution is added; and reaction is sufficiently carried out; step 5, the metal-organic framework/polydopamine/conductive macromolecular polymer compound is added into a monomer ordouble-bond biomacromolecular solution; and after additive is added, the needed hydrogel is formed by polymerization. The conductive hydrogel has excellent conductivity and electrochemical activity, and can be used in the preparation of drug carriers and biological electrodes.