TiO2/WS2/NiS (TWN) composites with Type-Ⅱ heterojunction structure were prepared by hydrothermal method and titration method. The results reveal that TWN5 exhibits the best photoelectrochemical (PEC) performance, and its photocurrent density is 69% exceeding that of the unadulterated TiO2 photoanode. Under simulated ocean conditions, the self-corrosion potential of 304ss combined with TW5 and TWN5 photoanodes is reduced to -0.64 V and -0.7 V, respectively. The main reason is that contact surface of WS2 and TiO2 formed a Type II heterostructure, which accelerates the separation and diffusion process of photoinduced carriers. In addition, the plasmon resonance effect of NiS improves the ability to absorb visible light and the metallic-like feature of NiS also promotes charge separation.