The structural and electronic properties of Nb-doped rutile TiO2 with several doping configurations were investigated by first-principles calculations based on the density functional theory. The calculations show that although the band gap in the NbTi, 2NbTi, and NbTi + Oi systems is small, the intragap states would be the electron–hole recombination center, leading to low photocatalytic efficiency. However, for the 2NbTi + Oi configuration, the impurity states are mainly located at the top of the valence band and the electron–hole recombination would be inhibited, indicating relatively higher photocatalytic efficiency. On the basis of the charge-compensated theory, two electrons on the transition-metal Nb atoms compensate for the same amount of holes on the acceptor level of a nonmetal interstitial O atom, in the model of 2NbTi + Oi. Such donor–acceptor codoping may not only suppress the electron–hole recombination but also maintain a reduced band gap, suggesting that the doping models would exhibit higher photocatalytic activity than pure TiO2. The calculation results show that the interstitial O atoms play an essential role in manipulating the valence state of impurity Nb. The role of the interstitial O atom in Nb-doped rutile TiO2 suggests that it can give rise to beneficial charge-compensation effects.