Two microporous three-dimensional metal–metallosalen frameworks are constructed from a dicarboxyl-functionalized Schiff base ligand and their H2, CO2 and CH4 adsorption capacities and fluorescence quenching behavior to the vapor of nitroaromatic compounds are studied.