The textile processing industry utilizes enormous amounts of water. After the dying process, the wastewater discharged to the environment contains carcinogens, non-biodegradable, toxic, and colored organic materials. This study aimed to develop a nanocomposite material with improved photocatalytic activity to degrade textile dyes and without a need for a post-separation process after the use. For this, nickel oxide nanoparticles (NiO NPs) were synthesized by a simple method in aqueous media. Then, NiO-doped polyaniline (PANI/NiO) with efficient absorption in the visible region (optical band gap of 2.08 eV) synthesized on a stainless steel substrate with electropolymerization of aniline in the aqueous media. The photocatalytic activity of PANI/NiO film was also investigated by the degradation of model dyes. Under UV and visible light irradiation, the PANI/NiO film degraded methylene blue and rhodamine B dyes entirely in 30 min. Moreover, the PANI/NiO film was also utilized to degrade real textile wastewater (RTW) without applying any pre-process; it was entirely decomposed by the nanocomposite film in only 45 min under UV light irradiation. The photocatalytic reaction rate of the pure PANI film is increased as 2.5 and 1.5 times with the addition of NiO NPs under UV and visible light irradiations for degradation RTW, respectively. The photocatalytic efficiency was attributed to reduced electron-hole pair recombination on the photocatalyst surface. Furthermore, the photocatalytic stability is discussed based on re-use experiments. The photocatalytic performance remains nearly unchanged, and the degradation of dyes is kept 94% after five cycles.