Polydopamine‐coated tungsten oxide (PDA@WO3) nanomaterial is synthesized by the polymerization of dopamine around the surface of WO3 to form the perfect yolk‐shell structures, and the optoelectronic properties and photocatalytic performance in the wide pH range are studied. After coating of PDA around the WO3 surface, as‐obtained PDA@WO3 possesses better light absorption, lower band gap, stronger photocurrent response, and lower resistance than pristine WO3. As a result, the improved photocatalytic ability of PDA@WO3 nanocomposites, by optimizing the amount of dopamine, is achieved. Compared with pristine WO3, PDA@WO3 exhibits better photocatalytic activity, and the degradation rate of methyl blue reaches 80.2 % (pH=5.4) and 94.5 % (pH=7.2) after 150 min. Combined band energy with trapping experiments of the active substance, photocatalytic activity and degradation mechanism are discussed. Originated from the π electron conjugation system of PDA and yolk‐shell structure of PDA@WO3, the mobility of photogenerated electrons increase and the recombination of electrons‐holes reduce that result in improvement of the photocatalytic performance of pristine WO3, implying surface‐modified metal oxide with yolk‐shell is a potential photocatalytic material for degradation in wide pH range.