The widespread emissions of toxic gases from fossil fuel combustion represent major welfare risks. Here we report the improvement of the selective sulfur dioxide capture from flue gas emissions of isoreticular nickel pyrazolate metal organic frameworks through the sequential introduction of missing-linker defects and extra-framework barium cations. The results and feasibility of the defect pore engineering carried out are quantified through a combination of dynamic adsorption experiments, X-ray diffraction, electron microscopy and density functional theory calculations. The increased sulfur dioxide adsorption capacities and energies as well as the sulfur dioxide/carbon dioxide partition coefficients values of defective materials compared to original non-defective ones are related to the missing linkers enhanced pore accessibility and to the specificity of sulfur dioxide interactions with crystal defect sites. The selective sulfur dioxide adsorption on defects indicates the potential of fine-tuning the functional properties of metal organic frameworks through the deliberate creation of defects.