The invasion of gas into liquid-filled nanopores is encountered in many engineering problems but is not yet well understood. We report molecular dynamics simulations of the invasion of methane gas into water-filled mica pores with widths of 2–6 nm. Gas invades into a pore only when the pressure exceeds a breakthrough pressure and a thin residual water film is left on the mica wall as the gas phase moves deeper into the pore. The gas breakthrough pressure of pores as narrow as 2 nm can be modeled reasonably well by the capillary pressure if the finite thickness of residual liquid water film and the liquid–gas interface are taken into account. The movement of the front of the liquid meniscus during gas invasion can be quantitatively described using the classical hydrodynamics when the negative slip length on the strongly hydrophilic mica walls is taken into account. Understanding the molecular mechanisms underlying the gas invasion in the system studied here will form the foundation for quantitative prediction of gas invasion in practical porous media.