g-C3N4 is promising photosensitizer (PS) for photodynamic therapy (PDT) because of its reactive oxygen species (ROS) generation ability. However, satisfactory photocatalytic activity and visible light response limit its effectiveness in in vivo therapy. Herein, we report a near-infrared (NIR)-responsive two-dimensional Ti3C2/g-C3N4 heterostructure for in situ oxygen-generating enhanced multimode PDT and photothermal therapy (PTT). We demonstrate that the assembly of Ti3C2 to g-C3N4 significantly extend the absorption of g-C3N4 to NIR region and enhance the photocatalytic activity owing to the improved photogenerated carrier separation compared to free g-C3N4. After further modification of triphenylphosphonium bromide (TPP) on Ti3C2/g-C3N4, and the mitochondria-targeting Ti3C2/g-C3N4-TPP enables produce oxygen-independent ·O2−- and ·OH through electron transfer. Moreover, it also achieves oxygen self-supplement 1O2 generation through energy transfer on account of its ability of photocatalytic split endogenous water. As a result, a multimode enhanced PDT is performed under both normoxic and hypoxic conditions. Ti3C2/g-C3N4-TPP also shows good photothermal performance derived from Ti3C2 for PTT. This work expands the g-C3N4-based PDT application, contributing to design photocatalytic nanomaterials with desired absorption to overcome the limitation of tumor hypoxia.