Herein we report the photocontrol of cucurbit[8]uril (CB[8])-mediated supramolecular polymerization of azobenzene-containing monomers. The CB[8] polymers were characterized both in solution and in the solid state. These host-guest complexes can be reversibly switched between highly thermostable photostationary states. Moreover, a remarkable stabilization of Z-azobenzene was achieved by CB[8] complexation, allowing for structural characterization in the solid state.