A novel low-cost synthesis of barium-modified TiO2 nanotube (TNT) arrays was used to obtain an immobilized photocatalyst for degradation of diclofenac. TNT arrays were prepared by electrochemical anodization of titanium thin films deposited on fluorine-doped tin oxide (FTO) coated glass by magnetron sputtering, ensuring transparency and immobilization of the nanotubes. The Ba-modifications were obtained by annealing solutions of Ba(OH)2 spin coated on top of TNT. Three different concentrations of Ba(OH)2 were used (12.5 mM, 25 mM and 50 mM). The crystalline structure, morphology and presence of Ba were characterized by X-ray diffraction, scanning electron microscopy and energy dispersive X-ray spectroscopy, respectively. Ba-modified TiO2 nanotubes (BTNT) were tested for photocatalytic degradation of diclofenac under UV/Vis radiation and it was proven that all of the Ba-modified samples showed an increase in photocatalytic activity with respect to the unmodified TNTs. The most efficient photocatalyst was the sample prepared with 25 mM Ba(OH)2 which showed 90% diclofenac degradation after 60 min. This result was in agreement with cyclic voltammetry measurements that showed the largest increase in photo-oxidation current densities for the same sample due to the increased generation of •OH radicals obtained by a more efficient photogenerated charge separation.