We present a breakthrough in the synthesis and development of functional gas-responsive materials as highly potent anticancer agents suitable for applications in cancer treatment. Herein, we successfully synthesised a stimuli-responsive multifunctional material (I-R6G) consisting of a carbon dioxide (CO2)-sensitive imidazole moiety and spirolactam-containing conjugated rhodamine 6G (R6G) molecule. The resulting I-R6G is highly hydrophobic and non- or weakly fluorescent. Simple CO2 bubbling treatment induces hydrophobic I-R6G to completely dissolve in water and subsequently form self-assembled nanoparticles, which exhibit unique optical absorption and fluorescence behaviours in water and extremely low haemolytic ability against sheep red blood cells. Reversibility testing indicated that I-R6G undergoes reversible CO2/nitrogen (N2)-dependent stimulation in water, as its structural and physical properties can be reversibly and stably switched by alternating cycles of CO2 and N2 bubbling. Importantly, in vitro cellular assays clearly demonstrated that the CO2-protonated imidazole moiety promotes rapid internalisation of CO2-treated I-R6G into cancer cells, which subsequently induces massive levels of necrotic cell death. In contrast, CO2-treated I-R6G was not internalised and did not affect the viability of normal cells. Therefore, this newly created system may provide an innovative and efficient route to remarkably improve the selectivity, safety and efficacy of cancer treatment.