Oxygen-enriched boron carbonitrides -known as boron carbon oxinitrides, BCNOshave exhibited remarkable properties with numerous works reporting on their performance as phosphors and some few ones as H 2 -adsorbents. However, the study of BCNOs capability for CO 2 uptaking has yet to be achieved. Herein, we have designed a simple process for preparation of freestanding three-dimensional (3D) BCNO structures via pyrolysis of supramolecular gels formed by H-bonding of melamine, boric acid and glucose. The 3D porous materials obtained by pyrolysis of supramolecular gels containing glucose exhibited a seaweed-like 3D structure formed by BCNO nanocrystals embedded within a carbonaceous matrix with a certain content of amorphous hydrogenated carbon. The particularly narrow porosities exhibited by these samples proved effective for CO 2 adsorption with uptakes of up to ca. 2 mmol/g at 25 °C. More interestingly, those samples prepared with high concentration of glucose behaved as molecular sieves and exhibited an excellent performance for CO 2 -CH 4 separation, especially at low pressures with k H values of up to 1.04•10 3 . M A N U S C R I P T A C C E P T E D ACCEPTED MANUSCRIPT 29 Ma, R.; Bando, Y.; Sato, T.; Kurashima, K. Growth, Morphology, and Structure of Boron Nitride Nanotubes, Chem. Mater. 2001, 13, 2965−2971 30 Zhang, X.; Lu, Z.; Lin, J.; Li, L.; Fan, Y.; Hu, L.; Xu, X.; Meng, F.; Zhao, J.; Tang, C. Luminescence properties of BCNO phosphor prepared by a green and simple method, Mater. Lett. 2013, 194, 72-75 31 Estroff, L. A.; Hamilton, A. D. Water Gelation by Small Organic Molecules, Chem. Rev. 2004, 104, 1201-1217 32 Zhang, S.; Dokko, K.; Watanabe, M. Carbon materialization of ionic liquids: from solvents to materials, Mater. Horiz. 2015, 2, 168-197