Although pyroptosis is critical for macrophages against pathogen infection, its role and mechanism in cancer cells remains unclear. PD-L1 has been detected in the nucleus, with unknown function. Here we show that PD-L1 switches TNFα-induced apoptosis to pyroptosis in cancer cells, resulting in tumour necrosis. Under hypoxia, p-Stat3 physically interacts with PD-L1 and facilitates its nuclear translocation, enhancing the transcription of the gasdermin C (GSDMC) gene. GSDMC is specifically cleaved by caspase-8 with TNFα treatment, generating a GSDMC N-terminal domain that forms pores on the cell membrane and induces pyroptosis. Nuclear PD-L1, caspase-8 and GSDMC are required for macrophage-derived TNFα-induced tumour necrosis in vivo. Moreover, high expression of GSDMC correlates with poor survival. Antibiotic chemotherapy drugs induce pyroptosis in breast cancer. These findings identify a non-immune checkpoint function of PD-L1 and provide an unexpected concept that GSDMC/caspase-8 mediates a non-canonical pyroptosis pathway in cancer cells, causing tumour necrosis.