Reversible adsorption and selective separation of ammonia (NH3) is a win–win strategy for resource utilization and pollutant control. However, synchronously achieving the efficiency, selectivity and recyclability for ammonia capture is a technological challenge. Adsorbents developed for such process should be engendered with multiple moderate interactions and structural stability. Here, we present a two-dimensional (2D) coordination polymer (CP) [Co(HAIPA)2]n (Co-AIPA, H2AIPA = 5-aminoisophthalic acid) with copious carboxyl groups within the interlayer, which shows a high uptake of 12.1 mmol g−1 at 298 K and 1 bar, exceptionally high selectivity for NH3/N2 (23985) and NH3/CO2 (2394), and cycling durability. It is unveiled that the host–guest interactions between –COOH and NH3, and the guest–guest interactions between NH3 molecules are formed in the slits of Co-AIPA. Overall, the spatial arrangement of dense carboxyl pendants within the interlayer allows for concerted interactions by multiple hydrogen bonding, leading to the superior NH3 uptake capacity, ideal selectivity, and good regeneration.