Although zinc phthalocyanines (ZnPcs) have promising applications in photodynamic therapy (PDT), their therapeutic efficacy suffer from their low solubility in the biological environment and their lack of tumor selectivity. Herein, to achieve the best PDT efficacy of hydrophobic zinc phthalocyanine as a photodynamic agent, we report a facile approach to prepare a new pH-sensitive self-healable and injectable hydrogel conjugated tetra-aldehyde functionalized zinc phthalocyanine (TA-ZnPc) (6 wt% w/ w) through a dynamic covalent Schiff-base linkage between benzaldehyde groups at TA-ZnPc b-ends and NH2 groups on chitosan as a safe carrier with a pH sensitive photosensitizer delivery system for localized cancer therapy. The molecular and geometric structure of TA-ZnPc also had notable effects in determining the hydrogel microstructure. The TA-ZnPc was employed not only as a photosensitizer agent for PDT but also as a cross-linking gelator for the preparation of a nanoporous hydrogel with high elasticity and unprecedentedly large surface area. The as-prepared pH-sensitive hydrogel can release TA-ZnPc in the acidic environment of tumors directly by evading the circulation system. TA-ZnPc was released from 1 to 8 days due to hydrolysis of the cross-linking linkage in acidic pH. The injectable hydrogel structure was characterized by FT-IR, 1H NMR, SEM and rheological measurements. Its dynamic nature imparts the self-healing capability of the network, as confirmed by the rheological recovery test, microscopic and macroscopic observations. Additionally, singlet-oxygen generation of the hydrogel conjugated TA-ZnPc could be finely controlled by varying pH which could manipulate the TA-ZnPc release behavior from the hydrogel. The photodynamic effect of hydrogel conjugated TA-ZnPc at different pH values was studied for two cell lines, namely (MDA-MB-231) and (A435). Conjugation of TAZnPc to a hydrogel can lead to much better viability under dark conditions than that of free TA-ZnP