A new interdigitated two-dimensional (2D) layered metal-organic framework (MOF) with switchable framework flexibility is synthesized using a highly flexible multifunctional dicarboxylate ligand capable of pi-pi stacking and hydrogen bonding interactions. The framework flexibility and CO2 adsorption behavior of the 2D layered MOF can be controlled by guest N,N-dimethylacetamide (DMA) molecules encapsulated in the solvent pores. Partial removal of the DMA molecule results in partial contraction of the framework, and the interlayer interactions of this partially contracted framework allow reversible expansion and contraction of the framework under CO2 at 195 K. On the other hand, the flexibility of a fully contracted interdigitated 2D framework with no DMA molecules in the solvent pores is distinctly different from that of a partially contracted framework. The interlayer interactions in a fully contracted framework are significantly stronger than those in a partially contracted framework. Notably, this framework does not exhibit framework expansion under the same conditions.