The efficacy of photodynamic therapy is hindered by the hypoxic environment in tumors and limited light penetration depth. The singlet oxygen battery (SOB) has emerged as a promising solution, enabling oxygen-and light-independent 1 O 2 release. However, conventional SOB systems typically exhibit an "always-ON" 1 O 2 release, leading to potential 1 O 2 leakage before and after treatment. This not only compromises therapeutic outcomes but also raises substantial biosafety concerns. In this work, we introduce a programmable singlet oxygen battery, engineered to address all the issues discussed above. The concept is illustrated through the development of a tumor-microenvironment-responsive pyridone−pyridine switch, PyAce, which exists in two tautomeric forms: PyAce-0 (pyridine) and PyAce (pyridone) with different 1 O 2 storage half-lives. In its native state, PyAce remains in the pyridone form, capable of storing 1 O 2 (t 1/2 = 18.5 h). Upon reaching the tumor microenvironment, PyAce is switched to the pyridine form, facilitating rapid and thorough 1 O 2 release (t 1/2 = 16 min), followed by quenched 1 O 2 release post-therapy. This mechanism ensures suppressed 1 O 2 production pre-and posttherapy with selective and rapid 1 O 2 release at the tumor site, maximizing therapeutic efficacy while minimizing side effects. The achieved "OFF−ON−OFF" 1 O 2 therapy showed high spatiotemporal selectivity and was independent of the oxygen supply and light illumination.