Carbons are important in a multitude of applications, and thus, the reversible control of carbon structures is of high interest. Here we report the reversible formation of graphitic structures with three distinct interlayer distances in case of two carbide-derived carbons (CDCs) loaded under hydrogen pressure observed with in situ neutron scattering methods. The formation of these graphitic structures determined with in situ neutron diffraction is brought forth by the confinement of H 2 in the porous structure when the temperature, T , is increased from T = 20 K–50 K under H 2 loading from 68 mbar to 10 bar. The confinement of the desorbing H 2 causes the pressure to increase inside the CDC structure and this increase of pressure is the cause for the reversible formation of graphitic domains. The confinement of H 2 at T = 50 K is possible due to the presence of ultramicropores and suitable curved carbon structures. The three distinct formed graphitic domains correspond to a highly pressurized, conventional highly ordered graphitic, and disoriented graphitic domains with possible H 2 /H intercalation. In situ quasi-elastic neutron scattering and gas adsorption methods are used to determine the H 2 transport properties and interactions with the CDCs. Image 1 • Reversible formation of graphitic carbon structures. • Formation of structures in the presence of H 2. • Structure formation caused by high-pressure H2 domains after temperature increase. • Curved and microporous carbons able to confine H 2 pressure during heating. [ABSTRACT FROM AUTHOR]