The separation of carbon dioxide from methane is an important process when purifying biogas and natural gas. Zeolite membranes and adsorbents are among the technologies suggested for efficient separation of carbon dioxide from these gases. In the present work, the adsorption of carbon dioxide and methane from binary mixtures in a low alumina Na-ZSM-5 zeolite film at various gas compositions and temperatures was studied using in situ ATR-FTIR (attenuated total reflection Fourier transform infrared) spectroscopy. Adsorbed concentrations were successfully extracted from infrared spectra. The experimental values of the adsorbed phase mole fraction of carbon dioxide and methane were compared to values predicted using the ideal adsorbed solution theory (IAST). The values predicted with the IAST agreed very well with values determined experimentally. The CO2/CH4 adsorption selectivity was determined, and at 35 °C a selectivity of 15.4 was obtained for an equimolar gas mixture. At the highest (0.9) and lowest (0.03) investigated mole fractions of carbon dioxide in the gas phase, the selectivity was higher compared to the other investigated mole fractions. At 35 °C the highest observed selectivity values were 31.1 and 20.4 for the highest and the lowest adsorbed mole fraction, respectively. At compositions closest to those found in biogas and natural gas, there was a decrease in the selectivity at higher temperatures, indicating that separation of carbon dioxide from methane in biogas and natural gas may be more efficient at low temperatures.