We use the multiscale simulation approach, which combines the first-principles calculations and grand canonical Monte Carlo simulations, to comprehensively study the doping of a series of alkali (Li, Na, and K), alkaline-earth (Be, Mg, and Ca), and transition (Sc and Ti) metals in nanoporous covalent organic frameworks (COFs), and the effects of the doped metals on CO 2 capture. The results indicate that, among all the metals studied, Li, Sc, and Ti can bind with COFs stably, while Be, Mg, and Ca cannot, because the binding of Be, Mg, and Ca with COFs is very weak. Furthermore, Li, Sc, and Ti can improve the uptakes of CO 2 in COFs significantly. However, the binding energy of a CO 2 molecule with Sc and Ti exceeds the lower limit of chemisorptions and, thus, suffers from the difficulty of desorption. By the comparative studies above, it is found that Li is the best surface modifier of COFs for CO 2 capture among all the metals studied. Therefore, we further investigate the uptakes of CO 2 in the Lidoped COFs. Our simulation results show that at 298 K and 1 bar, the excess CO 2 uptakes of the Li-doped COF-102 and COF-105 reach 409 and 344 mg/g, which are about eight and four times those in the nondoped ones, respectively. As the pressure increases to 40 bar, the CO 2 uptakes of the Li-doped COF-102 and COF-105 reach 1349 and 2266 mg/g at 298 K, respectively, which are among the reported highest scores to date. In summary, doping of metals in porous COFs provides an efficient approach for enhancing CO 2 capture.