The effects of mono-doping of 4f lanthanides with and without oxygen vacancy defect on the electronic structures of anatase TiO2 have been studied by first-principles calculations with DFT+U (DFT with Hubbard U correction) to treat the strong correlation of Ti 3d electrons and lanthanides 4f electrons. Our results revealed that dopant Ce is easy to incorporate into the TiO2 host by substituting Ti due to its lower substitutional energy (∼−2.0eV), but the band gap of the system almost keeps intact after doping. The Ce 4f states are located at the bottom of conduction band, which mainly originates from Ti 3d states. The magnetic moment of doped Ce disappears due to electron transfer from Ce to the nearest O atoms. For Pr and Gd doping, their substitutional energies are similar and close to zero, indicating that both of them may also incorporate into the TiO2 host. For Pr doping, some 4f spin-down states are located next to the bottom of the conduction band and narrow the band gap of the doping system. However, for Gd doping, the 4f states are located in deep valence band and there is no intermediate band in the band gap. The magnetic moment of dopant Gd is close to the value of isolated Gd atom (∼7μB), indicating no overlapping between Gd 4f with other orbitals. For Eu, it is hard to incorporate into the TiO2 host due to its very higher substitutional energy. The results also indicated that oxygen vacancy defect may enhance the adsorption of the visible light in Ln-doped TiO2 system.