A preparation method of a polyhedral cobalt phosphide catalyst for hydrogen production through water electrolysis comprises steps as follows: Co(NO3)2*6H2O and 2-methylimidazole are dissolved in methanol respectively, a 2-methylimidazole solution is poured into a Co(NO3)2 solution, the mixture is stirred and then aged at the room temperature, a product is centrifugally separated, vacuum drying is performed after washing with methanol, and a polyhedral metal organic frame ZIF-67 is obtained; then the polyhedral metal organic frame ZIF-67 is placed in a tube furnace, cobaltosic oxide is obtained through calcination in the air atmosphere, then the cobaltosic oxide and NaH2PO2*H2O are placed at two ends of a porcelain boat respectively, the NaH2PO2*H2O is located in the windward position of the tube furnace, and the polyhedral cobalt phosphide catalyst for hydrogen production through water electrolysis is obtained through calcination in the inert atmosphere. The crystallinity of the prepared cobalt phosphide catalyst material is high, the polyhedral morphology of a metal organic frame template is kept, the catalyst shows excellent properties in an electrocatalytic hydrogen evolution reaction, and the preparation technology is simple in process.