A real-time heparin monitor is required to optimize the dosage of heparin and its antidote, protamine sulfate, during extracorporeal circulation procedures. The gate effect of molecularly imprinted polymer (MIP) is a potential tool for the rapid and selective sensing of heparin. We here present a method to stabilize the measurement of heparin concentration in whole blood using an MIP-grafted electrode. An initiator of radical polymerization, the diethyldithiocarbamicbenzyl group, was introduced onto the surface of an indium-tin oxide (ITO) electrode. Heparin sodium, methacryloxethyltrimethoxysilane, and acrylamide were dissolved in water, and methylenebisacrylamide was dissolved in dimethylformamide. A mixture of the two solutions was introduced into the 50 μm gap between the surfaces of a quartz crystal plate and the treated ITO electrode. Ultraviolet light was irradiated onto the surface of the ITO to graft the copolymer of the monomers, then the ITO was washed with a 1 M sodium chloride aqueous solution to remove the heparin template and obtain the MIP-grafted electrode. Cyclic voltammetry was performed with the MIP-grafted electrode in physiological saline or bovine whole blood containing 0-8 units/ mL heparin and 5 mM ferrocyanide as a redox marker, and the relationship between the current intensity and the heparin concentration was analyzed. The current intensity decreased as the heparin concentration in either saline or whole blood increased, and the sensitivity of the electrode to heparin in blood was approximately 52% of its sensitivity to heparin in saline. The grafted-electrode was washed with a protease-containing detergent (Sterizyme® S, Maruishi Pharmaceutical) between measurements in blood. The heparin-sensitivity of the washed electrode in blood was 77% of that in saline. No sensitivity to chondroitin sulfate C was observed but sensitivity to low molecular weight heparin was demonstrated. We thus conclude that selective and stable sensing of heparin can be achieved using an electrode grafted with heparinimprinted polymer.