Flexible metal-organic frameworks that show reversible guest-induced phase transitions between closed and open pore phases have enormous potential for highly selective, energy-efficient gas separations. Here, we present the gate-opening process of DUT-8(Ni) that selectively responds to D
2
, whereas no response is observed for H
2
and HD. In situ neutron diffraction directly reveals this pressure-dependent phase transition. Low-temperature thermal desorption spectroscopy measurements indicate an outstanding D
2
-over-H
2
selectivity of 11.6 at 23.3 K, with high D
2
uptake. First-principles calculations coupled with statistical thermodynamics predict the isotope-selective gate opening, rationalized by pronounced nuclear quantum effects. Simulations suggest DUT-8(Ni) to remain closed in the presence of HT, while it also opens for DT and T
2
, demonstrating gate opening as a highly effective approach for isotopolog separation.