A photoactivatable poly(pyrrole–diazirine) film was synthesized and electropolymerized as a versatile tool for covalent binding of laccase and glucose oxidase on multiwalled carbon nanotube coatings and Pt, respectively. Irradiation of the functionalized nanotubes allowed photochemical grafting of laccase and its subsequent direct electrical wiring, as illustrated by the electrocatalytic reduction of oxygen. Moreover, covalent binding of glucose oxidase as model enzyme, achieved by UV activation of electropolymerized pyrrole–diazirine, allowed a glucose biosensor to be realized. This original method to graft biomolecules combines electrochemical and photochemical techniques. The simplicity of this new method allows it to be extended easily to other biological systems.