Using ab initio calculations, we have performed a study of the hydrostatic pressure effect on the equilibrium volume, lattice parameters, elastic modulus, and elastic anisotropy of selected M2AlC phases with M = Ti, V, Nb, and Ta. The deviations of our calculated volume change are lower than 3% comparing with experimental measurement, lead to a discrepancy in the bulk modulus less than 15%. Our results show a linear pressure dependence of the elastic modulus and the bulk modulus. Shear elastic anisotropy factor increase with the pressure enhancement, while the compressibility anisotropy remains constant around weak values.