The n-type CuInS2 nanoparticles were deposited successfully on n-type TiO2 nanotube surface via the successive ion layer absorption and reaction (SILAR) technique. Compared with the pure TiO2, the photoresponse of CuInS2/TiO2 films is expanded to the visible region, indicating an excellent visible light utilization rate and improved photoelectric conversion efficiency. Benefiting from the favorable n-n heterojunction structure, the photocurrent density of CuInS2/TiO2 photoanode under visible light irradiation exceeded 40 μA/cm2, which was 8 times that of the TiO2. The potential of the coupled 316L stainless steel in 3.5 wt% NaCl aqueous solution was droped by − 850 mV in the presence of CuInS2/TiO2 films, which showed a remarkable photocathode protection performance of n-n type CuInS2/TiO2 heterojunction materials.