Competitive sorption of CH4 and CO2 from a two-component gas mixture has been studied on three coals of different rank (subbituminous coal, high-volatile bituminous coal and anthracite). On each coal, binary excess sorption isotherms were measured in the dry state and after moisture-equilibration at 53% and 97% relative humidity (RH), to investigate the effect of pre-adsorbed water on the CH4 and CO2 sorption and selectivity at 318K. Excess sorption isotherms were determined using a manometric setup and CH4/CO2 feed gas mixtures containing between 70 and 85% of CH4.The total gas (CH4+CO2) excess sorption capacity is reduced by pre-adsorbed moisture, which is most pronounced for the subbituminous coal. A large decrease in excess sorption capacity was observed for the 53% RH moisture equilibrated samples, whereas only a small further decrease was observed upon moisturization to 97% RH. The anthracite had the highest sorption capacity by far, regardless of the amount of pre-adsorbed water.All measurements show a preferential sorption of CO2 at all three moisture states. The CO2 selectivity over CH4 tends to decrease with increasing maturity and moisture content. The mean CO2 selectivity for the three investigated coals varies between 6 and 9.The extended Langmuir model for adsorption of gas mixtures is shown to be an acceptable first order approximation of the measured competitive sorption isotherm.