Biomass is regarded as a promising low-cost precursor for the preparation of activated carbons. However, direct carbonization of biomass usually produces a low-surface-area or even non-porous carbons that are useless for CO2 capture. In this work, garlic peel was first transformed to a hydrochar by hydrothermal carbonization and then chemically activated by KOH to obtain activated carbons with high-surface-areas and large pore volumes. The microstructure and morphology of the activated carbons were characterized by N2 adsorption, SEM and XRD. Results indicate that their surface area and pore volume are mainly determined by the activation temperature and KOH/hydrochar mass ratio. Activated carbon (AC-28) obtained by KOH activation with a KOH/hydrochar ratio of 2 at 800 °C has a well-developed porosity with a surface area and pore volume of 1 262 m2/g and 0.70 cm3/g, respectively, while a reduction of the activation temperature to 600 °C (AC-26) results in a material whose corresponding values are 947 m2/g and 0.51 cm3/g. Although AC-26 exhibits a much lower surface area and pore volume compared with AC-28, it has the larger CO2 uptake of up to 4.22 mmol/g at 25 °C and 1 bar due to its higher microporosity of up to 98% and abundant narrow micropores, implying that the microporosity is one of the main factors for CO2 capture besides the traditionally-believed surface area and pore volume. The isosteric heat of CO2 adsorption indicates that the affinity between the activated carbon and CO2 molecules increases with the volume of narrow micropores less than 0.8 nm and the number of surface oxygen-containing functional groups.