Element-doped mesoporous titanium oxide has significant advantages in substance separation and adsorption due to its larger specific surface area and stronger hydrophobicity. However, its current synthesis methods have limitations such as complicated preparation process, high production cost, or not being environmentally friendly, and the synthesis of elementally doped titanium oxide materials by simple, low-cost, and green means is the research goal of this study. In this study, phosphorus-doped mesoporous titanium oxides (TiP) materials have been synthesized through a facile template-free method in an ethanol system, which were further modified by nitrogen doping with the use of urea as the nitrogen source. Both the synthesized TiP and P-N codoped sample (N-TiP) are amorphous with mesopores. It was revealed by FTIR and XPS spectra that the formation of Ti-O-P and -O-Ti-N bonds in the synthesized samples was due to the partial substitution of phosphorus for titanium in Ti-O-Ti bonds in mesoporous titanium oxide, while nitrogen replaced some oxygen in the -O-Ti-O bonds in the form of anions. The TiP sample was estimated by the BET method to have a relatively large surface area, up to 317 m2/g. The adsorption of TiP and N-TiP materials to lysozyme protein in a buffer solution at different pH values showed that the adsorption of TiP to lysozyme protein was larger, which was 32.68 μmol/g. It shows that TiP has potential as a multifunctional adsorbent.