TiO2/NaYF4:Yb3+,Er3+ nano-heterostructures are prepared in situ on the TiO2 photoanode of dye-sensitized solar cells (DSCs). Transmission electron microscopy (TEM) and high-resolution (HR)-TEM confirm the formation of TiO2/NaYF4:Yb3+,Er3+ nano-heterostructures. The up-converted fluorescence spectrum of the photoanode containing the nano-heterostructure confirms electron injection from NaYF4:Yb3+,Er3+ to the condution band (CB) of TiO2. When using a photoanode containing the nano-heterostructure in a DSC, the overall efficiency (η) of the device is 17% higher than that of a device without the up-conversion nanoparticles (UCNPs) and 13% higher than that of a device containing mixed TiO2 and UCNPs. Nano-heterostructures of TiO2/NaYF4:Yb3+,Tm3+ and TiO2/NaYF4:Yb3+,Ho3+ can also be prepared in situ on TiO2 photoanodes. The overall efficiency of the device containing TiO2/NaYF4:Yb3+,Ho3+ nano-heterostructures is 15% higher than the control device without UCNPs. When nano-heterostructures of TiO2/NaYF4:Yb3+,Tm3+ are used, the open-circuit voltage (Voc) and the short-circuit current density (Jsc) are all slightly decreased. The effect of the different UCNPs results from the different energy levels of Er3+, Tm3+, and Ho3+. These results demonstrate that utilizing the UCNPs with the apporpriate energy levels can lead to effective electron injection from the UCNPs to the CB of TiO2, effectively improving the photocurrent and overall efficiency of DSCs while using NIR light.