YPO4:Ln3+ (Ln = Eu and Sm) nanotubes were synthesized by a precipitation process in the presence of SDS. The XRD results showed that all samples have a xenotime type tetragonal structure, indicating that doped rare earth ions have no influence on the phase. The SEM and TEM images showed that all samples are nanotubes. On basis of the morphology of samples and the properties of SDS, the possible formation mechanism was speculated. YPO4:Eu3+ and YPO4:Sm3+ nanotubes showed characteristic emission bands of Eu3+ and Sm3+ ions, respectively. For YPO4:Eu3+/Sm3+ nanotubes, the codoping Sm3+ ions can enhance the emission intensity of Eu3+ ions.