Activation of the stimulator of interferon gene (STING) pathway within the tumor microenvironment has been shown to generate a strong antitumor response. Although local administration of STING agonists has promise for cancer immunotherapy, the dosing regimen needed to achieve efficacy requires frequent intratumoral injections over months. Frequent dosing for cancer treatment is associated with poor patient adherence, with as high as 48% of patients failing to comply. Multiple intratumoral injections also disrupt the tumor microenvironment and vascular networks and therefore increase the risk of metastasis. Here, we developed microfabricated polylactic-co-glycolic acid (PLGA) particles that remain at the site of injection and release encapsulated STING agonist as a programmable sequence of pulses at predetermined time points that mimic multiple injections over days to weeks. A single intratumoral injection of STING agonist-loaded microparticles triggered potent local and systemic antitumor immune responses, inhibited tumor growth, and prolonged survival as effectively as multiple soluble doses, but with reduced metastasis in several mouse tumor models. STING agonist-loaded microparticles improved the response to immune checkpoint blockade therapy and substantially decreased the tumor recurrence rate from 100 to 25% in mouse models of melanoma when administered during surgical resection. In addition, we demonstrated the therapeutic efficacy of STING microparticles on an orthotopic pancreatic cancer model in mice that does not allow multiple intratumoral injections. These findings could directly benefit current STING agonist therapy by decreasing the number of injections, reducing risk of metastasis, and expanding its applicability to hard-to-reach cancers.