Although innate immune modulators have shown promise as cancer immunotherapeutics, their clinical application is hindered by the challenge of achieving tumour-specific activation while minimizing systemic immune-related toxicity. Nanoscale metal–organic frameworks (MOFs) have emerged as effective carriers for photosensitizers to enable photodynamic therapy (PDT), which induces immunogenic cell death via reactive oxygen species (ROS) generation. We hypothesized that covalent conjugation of IMMs to nanoscale MOFs through ROS-cleavable linkers could localize immune activation to the tumour microenvironment while synergizing with PDT to enhance antitumour immunity. Here, we report the design of a hafnium-based nanoscale MOF, Hf-QP-DBP (QP and DBP denote amino-quaterphenyl dicarboxylate and 5,15-di(p-benzoato)-porphyrin ligands, respectively), functionalized with Resiquimod (R848) via a ROS-sensitive linker for combined PDT and immunotherapy. Upon light irradiation, the DBP photosensitizer within the MOF generates both singlet oxygen and hydroxyl radicals, enabling simultaneous induction of PDT and on-demand release of R848. This dual-function platform effectively induces cancer cell death and suppresses tumour growth in colon cancer models, demonstrating its potential as an on-demand and synergistic cancer immunotherapy strategy.