High-pressure stable structures of intermetallic TMBe2 (TM = Zr and Hf) have been fully explored up to 40 GPa using particle swarm structure searches combined with first-principles calculations. The resulting findings show that both intermetallics undergo a structure transition from the ambient-pressure layered AlB2-type structure to a uniform orthorhombic Cmcm structure at 4.5 GPa and 13.8 GPa, respectively. The significant volume collapses under high pressure indicate that the structural transitions of two intermetallics are typical first-order. During the pressure-induced phase transition process, the formation of newly folded Be hexagonal rings in the high-pressure Cmcm structure with unusual change of coordination numbers of TM atoms was attributed to the alternating distortions of the layer-like Be hexagonal rings in ambient AlB2-type structure. The contributions of atomic orbitals near the Fermi level changes correspondingly before and after the structural phase transition, demonstrated by an analyses of electronic band structures and density of states. An obvious degeneracy of TM-d orbitals in the new high-pressure Cmcm structure was further revealed. Additionally, a systematic comparative analysis of mechanical parameters and anisotropic distributions of TMBe2 intermetallics with two structures was performed.