A series of oxygen plasma–treated g‐C3N4/TiO2 nanotubes are prepared, which exhibit excellent photocatalytic performance for degrading pharmaceutical pollutants under simulated solar light irradiation. The structure and optical properties of photocatalysts are characterized using scanning electron microscope, transmission electron microscopy, X‐ray diffraction, UV–vis, atomic force microscopy, and X‐ray photoelectron spectroscopy analyses. The g‐C3N4 nanoparticles are coated on the surface of TiO2 forming a heterojunction structure, which extends the light‐absorption region and inhibits the recombination of electrons with holes. Ibuprofen is used as a model pharmaceutical pollutant. The heterojunction structure allows the g‐C3N4/TiO2 high photocatalytic efficiency that is two times larger than that of TiO2 nanotubes. The efficiency of g‐C3N4/TiO2 is further enhanced by oxygen plasma treatment. The oxygen plasma–treated g‐C3N4/TiO2 exhibits a photocatalytic efficiency of 95% within 90 min, which is much larger than that of TiO2 nanotubes (28%), g‐C3N4 (52%), and g‐C3N4/TiO2 nanotubes (70%). The kinetics of the photocatalytic degradation are also investigated. The plasma‐treated g‐C3N4/TiO2 exhibits the largest rate constant, which results from massive surface‐active species and surface oxygen. Finally, the structural evolution and reaction mechanism are investigated using molecular dynamics simulations, which offer a deep insight into the photocatalytic reaction.