Semiconductor oxides such as titanium dioxide (TiO2) have been used as photocatalysts for removing contaminants. In addition, TiO2 nanoparticles in suspension form are difficult to recover and recycle, and they are expensive. In our work, titanium dioxide has been immobilized on a commercially available, thermally stable, chemically stable, and cheap polymer. The nanocomposite is synthesized with varying percentages of TiO2, 0.25, 0.5, and 1 weight percent. The obtained nanocomposites were characterized, and the effect of the process parameter (i. e., initial concentration of MB, amount of catalyst, light wavelength, and power of light) was investigated. Also, the results show good photodegradation of MB by the TiO2‐epoxy nanocomposite. The decomposition of 10 ppm methylene blue (MB) during 200 min under 25 W visible LED irradiation can reach 95 %. This value is higher than that obtained with pristine TiO2, which does not have photocatalytic activity under LED light. The antibacterial activity of nanocomposites concerning Escherichia coli and Stephalocous aureus was studied, and an inhibition zone of 2 cm and 3.5 cm was obtained, respectively. Therefore, the TiO2‐epoxy nanocomposite was applied to a glass jar and tested after four months for the degradation of methylene blue (5 ppm) and methyl orange (8 ppm) under sunlight. The paint demonstrated good photocatalytic efficiency of 41 % and 72 % within 310 min, respectively.