A molecular simulation technique is employed to investigate the transport of H2/CH4 mixture through the two-dimensional (2D) channel between adjacent graphene layers. Pristine graphene membrane (GM) with pore width of 0.515~0.6 nm is found to only allow H2 molecules to enter rather than CH4, forming a molecular sieve. At pore widths of 0.64~1.366 nm, both H2 and CH4 molecules could fill into the GM channel, where the permeability of methane is more preferential than that of hydrogen with the largest CH4/H2 selectivity (1.89) at 0.728 nm. The edge functionalization by –H, –F, –OH, –NH2, and –COOH groups could significantly alter gas permeability by modifying the active surface area of the pore and tuning attractive and/or repulsive interaction with molecules at the entrance of channel. At the pore width of 0.6 nm, the H2 permeability of molecular sieve is enhanced by –H, –F, and –OH groups but restrained by –NH2, especially –COOH with a passing rate of zero. At pore widths of 0.64 and 0.728 nm, both –H and –F edge-functionalized GMs show a preferential selectivity of methane over hydrogen, while the favorable transport for GM–OH is changed from H2 molecules at 0.64 nm to CH4 molecules at 0.728 nm. For GM–NH2, it exhibits an excellent hydrogen molecular sieve at 0.64 nm and then turns into a significant H2/CH4 selectivity at 0.728 nm. Meanwhile, small H2 molecules start to enter the channel of GM–COOH at the pore width up to 0.728 nm. For the largest pore width of 1.336 nm, the influence of edge functionalization becomes small, and a comparable CH4/H2 selectivity is observed for all the considered membranes.