Flexible anionic metal-organic frameworks (MOFs) are transformed into neutral heterobimetallic systems via single-crystal-to-single-crystal processes invoked by cation insertion. These transformations are directed by cooperative bond breakage and formation, resulting in expansion or contraction of the 3D framework by up to 33% due to the flexible nature of the organic linker. These MOFs displays highly selective uptake of divalent transition-metal cations (e.g., Co(2+) and Ni(2+)) over alkali-metal cations (Li(+) and Na(+)).