First-principles calculations are performed to investigate the dissolving, trapping and detrapping of H in six bcc (V, Nb, Ta, Cr, Mo, W) and six fcc (Ni, Pd, Pt, Cu, Ag, Au) metals. We find that the zero-point vibrations do not change the site-preference order of H at interstitial sites in these metals except Pt. One vacancy could trap a maximum of 4 H atoms in Au and Pt, 6 H atoms in V, Nb, Ta, Cr, Ni, Pd, Cu and Ag, and 12 H atoms in Mo and W. The zero-point vibrations never change the maximum number of H atoms trapped in a single vacancy in these metals. By calculating the formation energy of vacancy-H (Vac-Hn) complex, the superabundant vacancy in V, Nb, Ta, Pd and Ni is demonstrated to be much more easily formed than in the other metals, which has been found in many metals including Pd, Ni and Nb experimentally. Besides, we find that it is most energetically favorable to form Vac-H1 complex in Pt, Cu, Ag and Au, Vac-H4 in Cr, Mo and W, and Vac-H6 in V, Nb, Ta, Pd and Ni. At last, we examine the detrapping behaviors of H atoms in a single vacancy and find that with the heating rate of 10 K/min a vacancy could accommodate 4, 5 and 6 H atoms in Cr, Mo and W at room temperature, respectively. The detrapping temperatures of all H atoms in a single vacancy in V, Nb, Ta, Ni, Pd, Cu and Ag are below room temperature