Low-molecular-weight compounds of certain structural features may form coacervates through liquid-liquid phase separation (LLPS). These coacervates can enter mammalian cells and affect cellular physiology. Controlling the properties of the coacervates inside cells, however, is a challenge. Here, we report photochemical reactions of spiropyran (SP)-based coacervates with two wavelengths of light, in vitro, in the cell, and in animals, generating reactive oxygen species (ROS) for photo-controlled cell killing. We identify an SP-containing compound, SP-PEG