We report the synthesis, structures and gas sorption studies of two three-dimensional (3D) metal-organic frameworks (MOFs) namely {[Zn2(OBZ)2L1]<middle dot>4DMF}n (1) and {[Co3(TER)3(L2)(DMF)]<middle dot>5DMF}n (2), where OBZ2- is deprotonated 4,4 '-oxybis(benzoic acid), TER2- is deprotonated terephthalic acid, DMF is N,N-dimethylformamide, L1 is 2,2 '-bis(pyridin-3-ylmethyl)-[5,5 '-biisoindoline]-1,1 ',3,3 '-tetraone and L2 is 5,5 '-carbonylbis(2-(pyridin-3-ylmethyl)isoindoline-1,3-dione). 1 and 2 are 3D MOFs containing 2D channels. The desolvated phases of 1 and 2 (1-d and 2-d) adsorb modest amounts of carbon dioxide (CO2) at 195 K and 273 K; however, 1-d displays stepwise adsorption of CO2 at 195 K and hysteretic desorption. Notably, a gate-opening effect is triggered after 1-d adsorbs 63 cm3 (STP) g-1, allowing the structure to open and adsorb an additional 54 cm3 (STP) g-1. In contrast, 1-d adsorbs relatively small amounts of hydrogen (H2) and nitrogen (N2) gases, 3 cm3 (STP) g-1 and 12 cm3 (STP) g-1, respectively, suggesting selectivity of CO2 over H2 and N2. This study discusses the synthesis, characterization and gas sorption studies of two MOFs containing substituted diimide ligands.