P-doped titania was synthesized by a one step hydrothermal method and sol-gel method, which is characterized by scanning electron microscopy (SEM), X-ray diffraction (XRD) and X-ray photoelectron spectroscopy (XPS). The samples prepared by hydrothermal method demonstrate higher photocatalytic activity toward the degradation of methylene blue under xenon lamp which has similar spectra to solar light, and also is much superior to that of the commercial P25. The as prepared P-doped titania shows a small particle size (the minimum reaches to 4.5 nm). In addition, the samples prepared by hydrothermal treatment could severely influence the crystal lattice structure. Morever, P-doped titania can further enhacnce the photocatalytic activity effectively, and hydrothermal treatment is a very suitable method for the synthesis of P-doped titania. This excellent performance could endow the as-prepared P-doped titania potential in purifying wastewater.