The preparation method comprises the following steps: respectively weighing 
cobalt-containing 
nitrate hydrate and 2-methylimidazole, adding the 
cobalt-containing 
nitrate hydrate and the 2-methylimidazole into 
methanol to prepare a solution, pouring the latter solution into the former solution, then adding a 
tungsten source, carrying out a stirring reaction at 
room temperature, and carrying out suction 
filtration, washing and 
drying so as to obtain the electrocatalytic 
bifunctional material. Centrifuging the obtained product, centrifugally washing the lower precipitate with 
methanol, 
drying at 50-70 DEG C, and calcining the obtained WS42-ZIF-67 at two stages of different temperatures in an 
inert atmosphere; and naturally cooling to obtain the electro-
catalysis bifunctional material with few 
layers of WS2 nanosheets anchored on the surface of the 
cobalt-
nitrogen-
doped carbon-based polyhedron. The preparation process is simple and efficient, the requirement for equipment is low, and the prepared electro-catalytic 
bifunctional material is high in specific surface area, has a specific pore structure and excellent electro-catalytic performance, is used for electro-catalytic 
oxygen evolution and 
hydrogen evolution reactions and can replace 
noble metal catalysts such as Pt and RuO2.