Manufacturing whole cancer cell vaccines (WCCV) with both biosafety and efficacy is crucial for tumor immunotherapy. Pyroptotic cancer cells, due to their highly immunogenic properties, present a promising avenue for the development of WCCV. However, the successful development of WCCV based on pyroptotic cancer cells is yet to be accomplished. Here, a facile strategy that utilized photocatalytic carbon dots (CDs) to induce pyroptosis of cancer cells for fabricating WCCV is reported. Photocatalytic CDs are capable of generating substantial amounts of hydroxyl radicals and can effectively decrease cytoplasmic pH values under white light irradiation. This process efficiently triggers cancer cell pyroptosis through the reactive oxygen species (ROS)-mitochondria-caspase 3-gasdermin E pathway and the proton motive force-driven mitochondrial ATP synthesis pathway. Moreover, in vitro, these photocatalytic CDs-induced pyroptotic cancer cells (PCIP) can hyperactivate macrophage (M0-M1) with upregulation of major histocompatibility complex class II expression. In vivo, PCIP induced specific immune-preventive effects in melanoma and breast cancer mouse models through anticancer immune memory, demonstrating effective WCCV. This work provides novel insights for inducing cancer cell pyroptosis and bridges the gap in the fabrication of WCCV based on pyroptotic cancer cells.