Adsorption using carbon-based materials has been established to be a feasible method for separating carbon dioxide and hydrogen to mitigate the emission of carbon dioxide into the atmosphere and for the collection of fuel for energy sources, simultaneously. We carried out density functional theory calculation with dispersion correction to investigate the physisorption characteristics of carbon allotropes such as graphene and graphyne for the competitive adsorption of CO2 and H2. It is worth noting that the graphyne represented preferable adsorption energies, short bond lengths and energy charges for both gases, compared with the characteristics observed with graphene. We found that in graphyne, both the affinitive adsorption of CO2, and the competitive adsorption of CO2 and H2, took place at the hollow site between acetylene links, which do not exist in graphene. We demonstrate that in the presence of H2, the CO2 adsorption selectivity of graphyne is higher than that of graphene, because of the improved electronic properties resulting from the acetylene links.