The unique optical properties of metal nitrides enhance many photoelectrical applications. In this work, a novel photodetector based on TiO2/TiN nanotubes was deposited on a porous aluminum oxide template (PAOT) for light power intensity and wavelength detection. The PAOT was fabricated by the Ni-imprinting technique through a two-step anodization method. The TiO2/TiN layers were deposited by using atomic layer deposition and magnetron sputtering, respectively. The PAOT and PAOT/TiO2/TiN were characterized by several techniques such as X-ray diffraction (XRD), scanning electron microscope (SEM), and energy dispersive X-ray (EDX). The PAOT has high-ordered hexagonal nanopores with dimensions ~ 320 nm pore diameter and ~ 61 nm interpore distance. The bandgap of PAOT/TiO2 decreased from 3.1 to 2.2 eV with enhancing absorption of visible light after deposition of TiN on the PAOT/TiO2. The PAOT/TiO2/TiN as photodetector has a responsivity (R) and detectivity (D) of 450 mAW-1 and 8.0 × 1012 Jones, respectively. Moreover, the external quantum efficiency (EQE) was 9.64% at 62.5 mW.cm−2 and 400 nm. Hence, the fabricated photodetector (PD) has a very high photoelectrical response due to hot electrons from the TiN layer, which makes it very hopeful as a broadband photodetector.