Tumour-associated macrophages (TAMs), as one of the most abundant and phagocytic tumour-infiltrating immune cells, play a pivotal role in tumour antigen clearance and immune suppression. M2-like TAMs present a heightened lysosomal acidity and protease activity, which limits the function of antigen cross-presentation. How to selectively reprogram the antigen-destroying TAMs to a restorative phenotype for efficient anti-tumour immunity is challenging. Here, we report a pH-gated nanoadjuvant (PGN) that selectively targets the lysosomes of M2-like TAMs in tumours rather than the corresponding organelles from macrophages in healthy tissues. Enabled by the PGN nanotechnology, M2-like TAMs are specifically switched to M1-like phenotypes with tuned-down lysosomal function featured by attenuated lysosomal acidity and cathepsin activity for improved antigen cross-presentation, thus provoking adaptive immune response and sustained tumour regression. Our findings provide new insights into how to specifically regulate lysosomal function of TAMs for efficient cancer immunotherapy.