Traditional photodynamic therapy (PDT) is limited by the penetration depth of visible light. Although the light source has been changed to near infrared, infrared light is unable to overcome the penetration barrier and it is only effective at the surface of the tumors. In this study, we used X-ray as a light source for deep-seated tumor treatment. A particle with a narrow band gap when exposed to soft X-rays would produce reactive oxygen species (ROS) to kill tumor cell, with less damage to the normal tissues. Anatase TiO2 has been studied as a photosensitizer in PDT. In the experiment, C was doped into the anatase lattice at an optimum atomic ratio to make the band gap narrower, which would be activated by X-ray to produce more ROS and kill tumor cells under stress. The results showed that the synthesized TiO2:C particles were identified as crystal structures of anatase. The synthesized particles could be activated effectively by soft X-rays to produce ROS, to degrade methylene blue by up to 30.4%. Once TiO2:C was activated by X-ray irradiation, the death rate of A549 cells in in vitro testing was as high as 16.57%, on day 2. In the animal study, the tumor size gradually decreased after treatment with TiO2:C and exposure to X-rays on day 0 and day 8. On day 14, the tumor declined to nearly half of its initial volume, while the tumor in the control group was twice its initial volume. After the animal was sacrificed, blood, and major organs were harvested for further analysis and examination, with data fully supporting the safety of the treatment. Based on the results of the study, we believe that TiO2:C when exposed to X-rays could overcome the limitation of penetration depth and could improve PDT effects by inhibiting tumor growth effectively and safely, in vivo.