Photodynamic therapy (PDT) is an anticancer therapy with proven efficacy; however, its application is often limited by prolonged skin photosensitivity and solubility issues associated with the phototherapeutic agents. Injectable hydrogels which can effectively provide intratumoral delivery of photosensitizers with sustained release are attracting increased interest for photodynamic cancer therapies. However, most of the hydrogels for PDT applications are based on systems with high complexity, and often, preclinical validation is not provided. Herein, we provide a simple and reliable pH-sensitive hydrogel formulation that presents appropriate rheological properties for intratumoral injection. For this, Temoporfin (m-THPC), which is one of the most potent clinical photosensitizers, was chemically modified to introduce functional groups that act as cross-linkers in the formation of chitosan-based hydrogels. The introduction of -COOH groups resulted in a water-soluble derivative, named PS2, that was the most promising candidate. Although PS2 was not internalized by the target cells, its extracellular activation caused effective damage to the cancer cells, which was likely mediated by lipid peroxidation. The injection of the hydrogel containing PS2 in the tumors was monitored by high-frequency ultrasounds and in vivo fluorescence imaging which confirmed the sustained release of PS2 for at least 72 h. Following local administration, light exposure was conducted one (single irradiation protocol) or three (multiple irradiation protocols) times. The latter delivered the best therapeutic outcomes, which included complete tumor regression and systemic anticancer immune responses. Immunological memory was induced as ∼75% of the mice cured with our strategy rejected a second rechallenge with live cancer cells. Additionally, the failure of PDT to treat immunocompromised mice bearing tumors reinforces the relevance of the host immune system. Finally, our strategy promotes anticancer immune responses that lead to the abscopal protection against distant metastases.