We investigate the atomic hydrogen adsorption on Mg(0001) by using density-functional theory within the generalized gradient approximation and a supercell approach. The coverage dependence of the adsorption structures and energetics is systematically studied for a wide range of coverage Theta [from 0.11 to 2.0 monolayers (ML)] and adsorption sites. In the coverage range 0 < Theta < 1.0, the most stable among all possible adsorption sites is the on-surface fcc site followed by the hcp site, and the binding energy increases with the coverage, thus indicating the higher stability of on-surface adsorption and a tendency to the formation of H islands (clusters) when increasing the coverage within the region 0 < Theta < 1.0. The on-surface diffusion path energetics of atomic hydrogen as well as the activation barriers for hydrogen penetration from the on-surface to the subsurface sites are also presented at low coverage. At high coverage of 1.0 < Theta < or = 2.0, it is found that the coadsorption configuration with 1.0 monolayer of H residing on the surface fcc sites and the remaining (Theta-1.0) monolayer of H occupying the subsurface tetra-I sites is most energetically favorable. The resultant H-Mg-H sandwich structure for this most stable coadsorption configuration displays similar spectral features to the bulk hydride MgH(2) in the density of states. The other properties of the H/Mg(0001) system including the charge distribution, the lattice relaxation, the work function, and the electronic density of states are also studied and discussed in detail. It is pointed out that the H-Mg chemical bonding during surface hydrogenation displays a mixed ionic/covalent character.