The invention provides a preparation and detection method of a mercury ion electrochemical biosensor. The electrochemical biosensor comprises a double-electron mediator, an electrode modifier and a functional substance, wherein the double-electron mediator is an Fc-Ru < 3 + > mediator, the electrode modifier is catechol and chitosan, and the functional substance is thymine. The electrochemical sensor can specifically recognize mercury ions, can be applied to mercury ion detection in water environment protection and wastewater treatment, and has the advantages of high sensitivity, good selectivity, low cost, simplicity in operation, convenience in carrying, short analysis time and the like.