Selective adsorption of SO2 is realized in a porous metal–organic framework material, and in-depth structural and spectroscopic investigations using X-rays, infrared, and neutrons define the underlying interactions that cause SO2 to bind more strongly than CO2 and N2.