To investigate the difference in the outermost layer between the (1 0 1¯ 0) and (0 0 0 1) surfaces of MB2 (M=Hf, Ta), we calculated the surfaces with first-principles. The relationships between surface energy and the chemical potential of boron show that both the stable HfB2 (1 0 1¯ 0) and (0 0 0 1) surfaces are terminated by Hf atoms. However, the Ta-terminated TaB2 (1 0 1¯ 0) surface is energetically favorable, which is different from the stable B-terminated TaB2 (0 0 0 1) surface. Bond population and density of states show that the B-Hf bonds of the HfB2 (1 0 1¯ 0) and (0 0 0 1) surfaces are strengthened compared with that of bulk HfB2, while the BB bonds in the second layer of the HfB2 surfaces are weakened. Moreover, the hybridization between B-2p and Hf-5d orbitals of the HfB2 (1 0 1¯ 0) is stronger than that of the HfB2 (0 0 0 1). For TaB2, the covalence of the BB bonds in the TaB2 (0 0 0 1) surface is stronger than that in the TaB2 (1 0 1¯ 0) surface. In the TaB2 (0 0 0 1), The B–Ta antibonds weaken the interactions between the topmost B layer and the second Ta layer, while the BB bonds in the topmost layer are strengthened. In the TaB2 (1 0 1¯ 0), the B-Ta bonds is strengthened and the BB bonds are weakened. Conclusively, for HfB2 single crystal, both the stable (1 0 1¯ 0) and (0 0 0 1) surfaces are terminated by Hf atoms. However, TaB2 crystal has two favorable surfaces: the B-terminated (0 0 0 1) and Ta-terminated (1 0 1¯ 0) surfaces.