Understanding the behaviour of flexible metal-organic frameworks (MOFs)-porous crystalline materials that undergo a structural change upon exposure to an external stimulus-underpins their design as responsive materials for specific applications, such as gas separation, molecular sensing, catalysis and drug delivery. Reversible transformations of a MOF between open- and closed-pore forms-a behaviour known as 'breathing'-typically occur through well-defined crystallographic transitions. By contrast, continuous breathing is rare, and detailed characterization has remained very limited. Here we report a continuous-breathing mechanism that was studied by single-crystal diffraction in a MOF with a diamondoid network, (Me2NH2)[In(ABDC)2] (ABDC, 2-aminobenzene-1,4-dicarboxylate). Desolvation of the MOF in two different solvents leads to two polymorphic activated forms with very different pore openings, markedly different gas-adsorption capacities and different CO2 versus CH4 selectivities. Partial desolvation introduces a gating pressure associated with CO2 adsorption, which shows that the framework can also undergo a combination of stepped and continuous breathing.