SAPO-34 molecular sieves have a high adsorption capacity in separation of CO2 from CO2/CH4 mixture. In this study, SAPO-34 was modified by different solutions at various operating conditions to enhance the removal of carbon dioxide from the methane gas. Modifications can change pore size and also Si/Al ratio in SAPO-34 and make changes in the acidity of the adsorbent via the ion exchange process. The effects of temperature and pressure on the separation were studied using the design of experiments. Finally, based on the results of the experimental optimization process applying central composite design (CCD) method, the highest yield of CO2 separation from the methane gas (95%) was obtained when using P-SAPO-34 sample at 17.4°C and 4.6 bar.