Incorporating mechanically interlocked molecular shuttles within a metal–organic framework that has enough free space in the crystal lattice to permit volume-conserving translational motion sets the stage for defect-free molecular-electronic device fabrication and more.