Methane (CH4) and carbon dioxide (CO2) are the main components of a renewable energy source of biogas. Separation of CO2 from biogas is significantly important to improve biogas performance, due to heating value in biogas depends on the concentration of methane. One of the gas separation technologies that has been widely used in chemical industries is carbon molecular sieve (CMS). This research explores the potential of CMS for biogas purification. CMS was prepared by modification of palm kernel shell-derived porous carbon using amine groups such as monoethanolamine (MEA), 2-amino-2-methyl-1-propanol (AMP), and diethanolamine (DEA). The effect of amine types on the separation parameters was studied by using a breakthrough experiment to obtain the most potential CMS materials. The methods of this research include the process of carbon oxidation using hydrogen peroxide, impregnation with an amine group, characterization of the CMS material obtained, CO2 and CH4 gas separation testing with a breakthrough system. The CMS was characterized by using N2 sorption analysis, fourier transform infrared spectroscopy, and scanning electron microscopy. The breakthrough experiment showed that CMS-MEA had the highest performance for separating CO2 and CH4 gases. In addition, the results also showed that loading of amine groups on carbon caused an increase in the uptake capacity of CO2, and the highest capacity was achieved by CMS-MEA of 13.2 mg/g.