Arrays of titanium dioxide (TiO2) nanotubes with different chemical compositions have been synthesized; their structural properties have been studied, and the characteristics of spin centers (defects) have been determined. All samples have appeared to contain carbon. It has been established that the main type of spin centers in TiO2 nanotubes are dangling carbon bonds, and their concentration correlates with the carbon content in the obtained structures. Under illumination, a reversible increase in the concentration of defects occurs, which is caused by their photoinduced recharging in the process of impurity absorption. This process is accompanied by an increase in the concentration of photoexcited electrons in the conduction band. The originality and novelty of the work are determined by the development of a method for controlling the density of defects and, accordingly, the concentration of photoinduced electrons by thermal treatment of samples under various conditions. The results open up new possibilities for the development of photocatalysts based on titanium dioxide nanotubes with a controlled electron concentration in the conduction band that function in the visible range of the spectrum.