Ammonia (NH 3 ) production in 2023 reached 150 million tons and is associated with potential concomitant production of up to 500 million tons of CO 2 each year. Efforts to produce green NH 3 are compromised since it is difficult to separate using conventional condensation chillers, but in situ separation with minimal cooling is challenging. While metal−organic framework materials offer some potential, they are often unstable and decompose in the presence of caustic and corrosive NH 3 . Here, we address these challenges by developing a pore-expansion strategy utilizing the flexible phosphonate framework, STA-12(Ni), which shows exceptional stability and capture of NH 3 at ppm levels at elevated temperatures (100−220 °C) even under humid conditions. A remarkable NH 3 uptake of 4.76 mmol g −1 at 100 μbar (equivalent to 100 ppm) is observed, and in situ neutron powder diffraction, inelastic neutron scattering, and infrared microspectroscopy, coupled with modeling, reveal a pore expansion from triclinic to a rhombohedral structure on cooperative binding of NH 3 to unsaturated Ni(II) sites and phosphonate groups. STA-12(Ni) can be readily engineered into pellets or monoliths without losing adsorption capacity, underscoring its practical potential.