Post‐surgical tumor recurrence remains a major clinical concern for patients with malignant solid tumors. Herein, an immunotherapeutic hydrogel (SAPBA/ZMC/ICG) is developed by incorporating metal ion‐cyclic dinucleotide (CDN) nanoparticles (Zn‐Mn‐CDN, ZMC) and a photosensitizer (indocyanine green, ICG) into phenylboronic acid (PBA)‐conjugated sodium alginate (SAPBA) for photothermal therapy (PTT)‐triggered in situ vaccination to inhibit post‐surgical recurrence and metastasis of malignant tumors. The gelation of SAPBA/ZMC/ICG in the residual tumors can achieve accurate local PTT and the local sustained release of CDN and Mn2+ with minimal detrimental off‐target toxic effects. Furthermore, CDN, which is an agonist of the stimulator of interferon genes (STING), along with Mn2+ can activate the STING pathway and trigger type‐I‐IFN‐driven immune responses against tumors. Therefore, the immunotherapeutic hydrogel with enhanced immune response by STING agonist and PTT‐induced immunogenic cell death (ICD) reprograms the post‐surgical immunosuppressive microenvironment, substantially decreasing the post‐surgical recurrence and metastasis of solid tumors in multiple murine tumor models when administered during surgical resection. Taken together, PTT‐triggered and STING‐mediated in situ cancer vaccination is an effective therapeutic intervention for post‐surgical recurrence and metastasis of tumors.