Activating antigen-presenting cells is essential to generate adaptive immunity, while the efficacy of conventional activation strategies remains unsatisfactory due to suboptimal antigen-specific priming. Here, in situ polymerization-mediated antigen presentation (IPAP) is described, in which antigen-loaded nanovaccines are spontaneously formed and efficiently anchored onto the surface of dendritic cells in vivo through co-deposition with dopamine. The resulting chemically bound nanovaccines can promote antigen presentation by elevating macropinocytosis-based cell uptake and reducing lysosome-related antigen degradation. IPAP is able to prolong the duration of antigen reservation in the injection site and enhance subsequent accumulation in the draining lymph nodes, thereby eliciting robust antigen-specific cellular and humoral immune responses. IPAP is also applicable for different antigens and capable of circumventing the disadvantages of complicated preparation and purification. By implementation with ovalbumin, IPAP induces a significant protective immunity against ovalbumin-overexpressing tumor cell challenge in a prophylactic murine model. The use of the SARS-CoV-2 Spike protein S1 subunit also remarkably increases the production of S1-specific immunoglobulin G in mice. IPAP offers a unique strategy for stimulating antigen-presenting cells to boost antigen-specific adaptive responses and proposes a facile yet versatile method for immunization against various diseases.