An unprecedented 2D → 3D metal-organic polyrotaxane framework constructed from cadmium and a flexible star-like ligand.