Abstract Heparin-doped affinity electromembrane was fabricated by synthesizing conducting polymers polypyrrole onto porous polyethersulfone membrane using heparin as both ligand and dopant. The obtained affinity electromembrane exhibited a uniform conductivity value of 1.73 × 10 −4 S/cm. The content of heparin of affinity electromembrane was ∼0.894 mg/g membrane. Such heparin-doped affinity electromembranes were used to purify thrombin. The adsorption mechanism of thrombin and the effects of temperature, initial concentration of thrombin and potential on adsorption were investigated by batch experiments. The results showed that the adsorption capacity increased with increasing the temperature, initial concentration of thrombin and potential, and the adsorption isotherm fitted the Freundlich model well. Elution of protein showed desorption ratio was up to 93.1% using 2.0 M NaSCN solution as the desorption agent. The adsorption capacities of all the tested affinity electromembranes did not significantly change during the repeated adsorption–desorption operations.