Cancer has become a highly prevalent disease and poses serious threats to human health. Conventional cancer treatments still face high risks of recurrence. Training the immune system to recognize and eliminate tumors via external stimulation, such as vaccines, emerges as a promising approach for cancer prevention and treatment. However, injectable vaccines may have limited immune activation, causing difficulties in maintaining long-term immune surveillance of tumorigenesis by tumor-specific cytotoxic T cells. Here, degradable zwitterionic cryogels were prepared using the cryogelation technique. The cryogenic preparation maintained the biological activities of tumor antigens and immune adjuvants loaded in the cryogels. The macroporous structure endowed the injectability of cryogels into the body via conventional syringes. In the presence of proteases, the cryogels degraded, allowing sustained release of antigens and adjuvants, ensuring continued dendritic cell (DC) recruitment and antigen presentation to maturing tumor-specific cytotoxic T cells. In vivo experiments demonstrated that the cryogel cancer vaccines elicited robust immune activation and effectively modulated tumor microenvironments. The combination with photothermal therapy significantly inhibited tumor growth, showing great potential for preventing postoperative recurrence. Additionally, the zwitterionic cryogels were biocompatible without obvious toxicities during degradation. The cryogels could serve as effective vaccine platforms to prevent cancer recurrence after surgery.