Abstract Based on ab initio calculations, we utilize the mean-field potential approach with the quantum modification in conjunction with stress–strain relation to investigate the elastic anisotropies and sound velocities of hcp and bcc Be under high-temperature (0–6000 K) and high-pressure (0–500 GPa) conditions. We propose a general definition of anisotropy for elastic moduli and sound velocities. Results suggest that the elastic anisotropy of Be is more significantly influenced by pressure than by temperature. The pressure-induced increase of c/a ratio makes the anisotropy of hcp Be significantly strengthen. Nevertheless, the hcp Be still exhibits smaller anisotropy than bcc Be in terms of elastic moduli and sound velocities. We suggest that measuring the anisotropy in shear sound velocity may be an approach to distinguishing the hcp–bcc phase transition under extreme conditions.