TiO2 has high chemical stability, strong catalytic activity and is an electron transport material in organic solar cells. However, the presence of trap states near the band edges of TiO2 arising from defects at grain boundaries significantly affects the efficiency of organic solar cells. To become an efficient electron transport material for organic photovoltaics and related devices, such as perovskite solar cells and photocatalytic devices, it is important to tailor its band edges via doping. Nitrogen p-type doping has attracted considerable attention in enhancing the photocatalytic efficiency of TiO2 under visible light irradiation while hydrogen n-type doping increases its electron conductivity. DFT calculations in TiO2 provide evidence that nitrogen and hydrogen can be incorporated in interstitial sites and possibly form NiHi, NiHO and NTiHi defects. The experimental results indicate that NiHi defects are most likely formed and these defects do not introduce deep level states. Furthermore, we show that the efficiency of P3HT:IC60BA-based organic photovoltaic devices is enhanced when using hydrogen-doping and nitrogen/hydrogen codoping of TiO2, both boosting the material n-type conductivity, with maximum power conversion efficiency reaching values of 6.51% and 6.58%, respectively, which are much higher than those of the cells with the as-deposited (4.87%) and nitrogen-doped TiO2 (4.46%).