Tumor vaccine is a promising cancer treatment modality, however, the convenient antigens loading in vivo and efficient delivery of vaccines to lymph nodes (LNs) still remain a formidable challenge. Herein, an in situ nanovaccine strategy targeting LNs to induce powerful antitumor immune responses by converting the primary tumor into whole-cell antigens and then delivering these antigens and nanoadjuvants simultaneously to LNs is proposed. The in situ nanovaccine is based on a hydrogel system, which loaded with doxorubicin (DOX) and nanoadjuvant CpG-P-ss-M. The gel system exhibits ROS-responsive release of DOX and CpG-P-ss-M, generating abundant in situ storage of whole-cell tumor antigens. CpG-P-ss-M adsorbs tumor antigens through the positive surface charge and achieves charge reversal, forming small-sized and negatively charged tumor vaccines in situ, which are then primed to LNs. Eventually, the tumor vaccine promotes antigens uptake by dendritic cells (DCs), maturation of DCs, and proliferation of T cells. Moreover, the vaccine combined with anti-CTLA4 antibody and losartan inhibits tumor growth by 50%, significantly increasing the percentage of splenic cytotoxic T cells (CTLs), and generating tumor-specific immune responses. Overall, the treatment effectively inhibits primary tumor growth and induces tumor-specific immune response. This study provides a scalable strategy for in situ tumor vaccination.