The invention provides a preparation method of a platinum-doped tungsten oxide catalyst with rich oxygen vacancies and for electrolysis of water. The platinum-doped tungsten oxide catalyst is preparedfrom the following raw materials: AgNO<3>, cis-Pt(NH<3>)<2>Cl<2> and Na<2>WO<4> in a molar ratio of 2: 1: 1. The preparation method comprises the following steps: dissolving AgNO<3>, cis-Pt(NH<3>)<2>Cl<2> and Na<2>WO<4> with water, then adjusting the pH value of the formed solution to 3.6-3.8 with hydrochloric acid, and carrying out a stirring reaction to generate a yellow precipitate; filteringthe yellow precipitate, and crystallizing a filtrate in the dark to obtain a colorless crystal; and placing the crystal in a high-temperature tubular furnace, and carrying out calcining in an Ar atmosphere to obtain the platinum-doped tungsten oxide catalyst with rich oxygen vacancies. The catalyst has excellent ability in catalyzing electrolysis of water and is good in stability.