Through single-crystal-to-single-crystal transformation, highly active Ba2+open metal sites are achieved in porous MOFs, which exhibit efficient catalytic capacity for the cyanosilylation of aldehydes and ketones and show excellent fluorescence sensing of DMSO molecules.