Two isostructural octahedral metal-organic frameworks formulated as {[Zn3TBTC2(DMA)(H2O)]·3DMA·3H2O}n (1), {[Cd3TBTC2(DMA)2(H2O)2]·2DMA·2H2O}n (2) have been successfully prepared via solvothermal synthesis based on a predesigned semi-rigid ligand, 1,3,5-tris[3-(carboxyphenyl)oxamethyl]-2,4,6-trimethylbenzene acid (H3TBTC). In the structure, the semi-rigid ligand adopts cis,cis,cis- and cis,trans,trans-conformations. Six cis,cis,cis- conformational TBTC3- ligands connect six M3(COO)6 (M=Zn(II) or Cd(II) secondary building units (SBUs) to form a pumpkin-shaped metal- organic nanocage. Viewing only the SBUs as vertexes, the pumpkin-shaped nanocage can be seen as a slightly distorted octahedral nanocage. Acting as supramolecular building blocks (SBBs), every octahedral nanocage connects 18 cis,trans,trans-conformational TBTC3- ligands, while every cis,trans,trans-conformational TBTC3- ligand connects three octahedral cages. Thus, the framework can be simplified as a (3,18)-connected network with point symbol of {433.684.836}{43}6. Moreover, upon removal of free guest solvent molecules, compounds 1~2 have metal clusters locating in the tunnel walls, which may have strong interaction with molecules with high quadrapole moment, and they show preferential adsorption of CO2 over N2/H2. The resulting materials have potential for separation of CO2 from other gas molecules such as N2 and H2. The solid state photoluminescent spectra of 1~2 as well as the free H3TBTC ligand were examined at room temperature. When excited at 320 nm, the free ligand shows a maximum emission at 434 nm, which can be ascribed to the π-π* transition of the aromatic rings. The strongest emission peak for compounds 1~2 are observed at about 424 nm. By comparison of the emission energies and profiles of the free H3TBTC ligand and compounds 1~2, the luminescent behavior of compounds 1~2 are considered to be originated from H3TBTC ligands. The blue-shifted bands of their emissions may result from the fact that the ligands are not allowed to relax along the torsional mode upon photoexcitation.