The methane storage behavior in nanoporous material is significantly different from bulk phase, and has a fundamental role in methane extraction from shale and its storage for vehicular applications. Here we show that the behavior and mechanisms of the methane storage are mainly dominated by the ratio of the interaction between methane molecules and nanopores wall to the methane intermolecular interaction, and the geometric constraint. By linking the macroscopic properties of methane storage to the microscopic properties of methane molecules-nanopores wall molecules system, we develop an equation of state for methane at supercritical temperature over a wide range of pressure. Molecular dynamic simulation data demonstrate that this equation is able to relate very well the methane storage behavior with each of key physical parameters, including pore size, shape, wall chemistry and roughness. Moreover, this equation only requires one fitted parameter, and is simply and powerful in application.