A biomaterial-based vaccination system that uses minimal extracorporeal manipulation could provide in situ enhancement of dendritic cell (DC) numbers, a physical space where DCs interface with transplanted tumour cells, and an immunogenic context. Here we encapsulate GM-CSF, serving as a DC enhancement factor, and CpG ODN, serving as a DC activating factor, into sponge-like macroporous cryogels. These cryogels are injected subcutaneously into mice to localize transplanted tumour cells and deliver immunomodulatory factors in a controlled spatio-temporal manner. These vaccines elicit local infiltrates composed of conventional and plasmacytoid DCs, with the subsequent induction of potent, durable and specific anti-tumour T-cell responses in a melanoma model. These cryogels can be delivered in a minimally invasive manner, bypass the need for genetic modification of transplanted cancer cells and provide sustained release of immunomodulators. Altogether, these findings indicate the potential for cryogels to serve as a platform for cancer cell vaccinations. Immune responses are induced in the organized, cytokine-rich environment of lymph nodes, which can be mimicked by biomaterials. Here the authors show that injectable sponge-like gels decorated with immunostimulatory factors attract dendritic cells and boost antitumour immune responses in mice.