The photoisomerization behavior of cyanostilbene molecules is a hotspot in supramolecular configuration transformation research. Here, we reported a cyanostilbene derivative that converted from the Z,Z-isomer to the E,E-isomer under UV light irradiation at 365 nm. This process can be reversibly converted only in the presence of cucurbit[8]uril under the same light source, accompanied by the reversible conversion of fluorescence from green to yellow. No effective configuration transformation occurred with guest molecules only or upon the addition of cucurbit[7]uril. The photoisomerization was fully characterized by UV-vis and fluorescence spectroscopy, NMR, high-resolution mass spectrometry, and transmission electron microscopy. This work provides a new method for the supramolecular macrocyclic-activated configuration transformation.