By means of advanced techniques of molecular simulations, we have studied the chemical equilibrium of methane steam reforming reaction. We have computed the conversion of CH4, yield and selectivity of H-2, etc. in the gas phase by reactive canonical Monte Carlo (RCMC) method and compared with those from Gibbs energy of formation method. The consistency of the two methods encourages us to use the RCMC method to optimize the operating conditions. We found that under low pressure 0.1 MPa, high temperature 1073 K and high water-gas ratio H2O/CH4 = 5, the CH4 conversion, H-2 yield and selectivity were the highest, with the values of 99.93%, 3.51 mol/molCH(4) and 99.98%, respectively. In addition, the pore size of activated carbon significantly affects the chemical equilibrium composition in the pores. Since low pressure and high temperature are not conducive to the adsorption of reactive components by activated carbon, the chemical balance in the pores cannot be improved. At 773 K, 3.0 MPa and pore width is less than 2 nm, the pores are mainly occupied by CH4 and H2O reactant molecules. Further increasing the temperature can increase the H-2 content in the pores, but the adsorption capacity in the pores will decrease. We use activated carbon to adsorb and separate CO and H-2 (CO:H-2 = 1:3), the main components after the gas phase reaction reaches equilibrium. At 298 K, 7.5 MPa and the optimal pore width of 0.76 nm, the CO/H-2 selectivity is 28.3 and the CO adsorption capacity is 8.45 mmol/cm(3). (C) 2021 Hydrogen Energy Publications LLC. Published by Elsevier Ltd. All rights reserved.