Atomistic simulations have been performed on CO2 storage in covalent-organic frameworks (COFs) including 3D (COF-102, COF-103, COF-105, and COF-108), 2D (COF-6, COF-8, COF-10) and 1D (COF_NT) structures. Compared to 2D and 1D COFs, 3D COFs have substantially larger free volume, porosity and surface area. As a counterbalance of low framework density and large porosity, COF-105 and COF-108 show exceptionally high storage capacity, even surpassing the experimentally measured highest capacity in MOF-177. COF-6 exhibits the largest isosteric heat and Henry constant due to the presence of constricted pores, but the lowest saturation capacity. COF_NT has adsorption behavior similar to a carbon nanotube. Different adsorption capacities in COFs are attributed to the interplay of various complex factors such as framework density, free volume, porosity and surface area. Gravimetric and volumetric capacities at 300 K and 30 bar correlate well with these factors. The molecular-based structure-function correlations are useful to predict capacity and screen COFs for CO2 storage.