Covalent organic frameworks (COFs), due to their low-density, high-porosity, and high-stability, have promising applications in gas storage. In this study we have explored the potential of COFs doped with Li and Ca metal atoms for storing hydrogen under ambient thermodynamic conditions. Using density functional theory we have performed detailed calculations of the sites Li and Ca atoms occupy in COF-10 and their interaction with hydrogen molecules. The binding energy of Li atom on COF-10 substrate is found to be about 1.0 eV and each Li atom can adsorb up to three H(2) molecules. However, at high concentration, Li atoms cluster and, consequently, their hydrogen storage capacity is reduced due to steric hindrance between H(2) molecules. On the other hand, due to charge transfer from Li to the substrate, O sites provide additional enhancement for hydrogen adsorption. With increasing concentration of doped metal atoms, the COF-10 substrate provides an additional platform for storing hydrogen. Similar conclusions are reached for Ca doped COF-10.