The invention discloses a preparation method of a sensor electrode surface anti-biological-pollution coating. The method is characterized by comprising two major steps of synthesizing photosensitive hyaluronic acid and preparing an anti-biological-pollution coating. The prepared photosensitive hyaluronic acid has high hydrophilcity, optical crosslinking performance and good biocompatibility. The synthesis of the photosensitive hyaluronic acid is simple; the raw materials can be easily obtained; the industrial production can be easily realized; through the introduction of photosensitive monomers, on the basis that the coating achieves the self excellent characteristics of the hyaluronic acid, the coating structure can be fixed through ultraviolet light crosslinking. When the photosensitivehyaluronic acid is applied to raw liquid sample detection, a sensor electrode based on modification by the photosensitive hyaluronic acid coating has long-term and efficient anti-biological-pollutioncapability. The light crosslinking technology, the functional coating technology and the biosensing technology are combined; the preparation method can be widely applied to the fields of food safety,biological medicine, environment protection monitoring, life safety and the like.