Tumor vaccine, a promising modality of tumor immunotherapy, needs to go through the process of tumor antigen generation and loading, antigen drainage to lymph nodes (LNs), antigen internalization by dendritic cells (DCs), DC maturation, and antigen cross-presentation to activate T-cells. However, tumor vaccines are often unable to satisfy all the steps, leading to the limitation of their application and efficacy. Herein, based on a smart nanogel system, an in situ nano-vaccine (CpG@Man-P/Tra/Gel) targeting LNs was constructed to induce potent anti-tumor immune effects and inhibit the recurrence and metastasis of ovarian cancer. The CpG@Man-P/Tra/Gel exhibited MMP-2-sensitive release of trametinib (Tra) and nano-adjuvant CPG@Man-P, which generated abundant in situ depot of whole-cell tumor antigens and formed in situ nano-vaccines with CpG@Man-P. Benefiting from mannose (Man) modification, the nano-vaccines targeted to LNs, promoted the uptake of antigens by DCs, further inducing the maturation of DCs and activation of T cells. Moreover, CpG@Man-P with different particle sizes were prepared and the effective size was selected to evaluate the antitumor effect and immune response in vivo. Notably, combined with PD-1 blocking, the vaccine effectively inhibited primary tumor growth and induced tumor-specific immune response against tumor recurrence and metastasis of ovarian cancer.