Dysregulated NLRP3 inflammasome activity results in uncontrolled inflammation, which underlies many chronic diseases. Although mitochondrial damage is needed for the assembly and activation of the NLRP3 inflammasome, it is unclear how macrophages are able to respond to structurally diverse inflammasome-activating stimuli. Here we show that the synthesis of mitochondrial DNA (mtDNA), induced after the engagement of Toll-like receptors, is crucial for NLRP3 signalling. Toll-like receptors signal via the MyD88 and TRIF adaptors to trigger IRF1-dependent transcription of CMPK2, a rate-limiting enzyme that supplies deoxyribonucleotides for mtDNA synthesis. CMPK2-dependent mtDNA synthesis is necessary for the production of oxidized mtDNA fragments after exposure to NLRP3 activators. Cytosolic oxidized mtDNA associates with the NLRP3 inflammasome complex and is required for its activation. The dependence on CMPK2 catalytic activity provides opportunities for more effective control of NLRP3 inflammasome-associated diseases.