Graphite membranes have gained attention in membrane technology for gas separation due to their high stiffness, strength, and stability in corrosive and high-temperature environments. Graphite exists naturally in geologic media and can also be prepared by synthetic processes. In- situ hydrogen (H2) production in petroleum reservoirs or H2 storage in depleted gas reservoirs results in contamination with CH4 and CO2. To address the separation challenge at the surface, a sustainable downhole wellbore membrane must be available to separate H2, leaving behind CO2 and other gases to improve operational economics. Currently, there are no studies in the literature on the self-diffusivity of gases (CO2, H2, and CH4) in graphite as a function of pore size. To overcome time constraints in diffusivity experiments, this work utilized mathematical models and molecular simulations to delineate the self-diffusivity of gases in graphite of different pore sizes.To acknowledge subsurface operational conditions during in situ hydrogen production, we considered a temperature of 360 K and a wide pressure spectrum from 2 MPa to 20 MPa. In this study, we explored the diffusive nature of H2, CH4, and CO2 gases in different nanopore-sized graphite using analytical and molecular simulation approaches. We validated the results by presenting unrestricted case density calculations. First, effective diffusivity was calculated using the mean free pore path, followed by gas adsorption at high pressures (10–20 MPa) and a temperature of 350 K. The study utilized theoretical models and molecular dynamics (MD) simulations to determine the self-diffusivity of gases in graphite systems with various structures.