Metal-organic framework (MOF) type crystals in which rigid, viologen-based pillars are surrounded by cucurbit[7]uril (CB[7]) macrocycles are described. These metal-organic rotaxane frameworks (MORF) are obtained by desolvation of a crystal precursor featuring a network already near-optimal toward 3D metal-ligand reticulation and show reversible photochromism.