The stimulator of interferon genes (STING) is an endoplasmic reticulum transmembrane protein that is a target of therapeutics for infectious diseases and cancer. However, early-phase clinical trials of small-molecule STING agonists have shown limited antitumour efficacy and dose-limiting toxicity. Here, we show that a polyvalent STING agonist-a pH-sensitive polymer bearing a seven-membered ring with a tertiary amine (PC7A)-activates innate-immunity pathways through the polymer-induced formation of STING-PC7A condensates. In contrast to the natural STING ligand 2',3'-cyclic-GMP-AMP (cGAMP), PC7A stimulates the prolonged production of pro-inflammatory cytokines by binding to a non-competitive STING surface site that is distinct from the cGAMP binding pocket. PC7A induces antitumour responses that are dependent on STING expression and CD8+ T-cell activity, and the combination of PC7A and cGAMP led to synergistic therapeutic outcomes (including the activation of cGAMP-resistant STING variants) in mice bearing subcutaneous tumours and in resected human tumours and lymph nodes. The activation of the STING pathway through polymer-induced STING condensation may offer new therapeutic opportunities.