Due to their characteristic geometry, TiO2 nanotubes (TNTs), suitably doped by metal-substitution to enhance their photocatalytic properties, have a high potential for applications such as clean fuel production. In this context, we present a detailed investigation of the magnetic, electronic, and optical properties of transition-metal doped TNTs, based on hybrid density functional theory. In particular, we focus on the 3d, the 4d, as well as selected 5d transition-metal doped TNTs. Thereby, we are able to explain the enhanced optical activity and photocatalytic sensitivity observed in various experiments. We find, for example, that Cr- and W-doped TNTs can be employed for applications like water splitting and carbon dioxide reduction, and for spintronic devices. The best candidate for water splitting is Fe-doped TNT, in agreement with experimental observations. In addition, our findings provide valuable hints for future experimental studies of the ferromagnetic/spintronic behavior of metal-doped titania nanotubes.