Temperature dependences of thermal and elastic properties, such as the Grüneisen parameters, thermal expansion, bulk modulus, and heat capacity of Ti2AlC and Cr2AlC, are studied by combining first-principles method and lattice dynamic calculation based on the quasi-harmonic model. Experimental thermal expansion coefficient is also measured for comparison. Thermal expansion coefficients of Ti2AlC and Cr2AlC show different trends: Ti2AlC exhibits anisotropic thermal expansion while Cr2AlC shows generally isotropic character. The mechanism is explored by investigating the isotropy or anisotropy of Grüneisen parameters (phonon anharmonicity and thermal pressure) and elastic stiffness (response to thermal pressure) of Ti2AlC and Cr2AlC. In addition, the calculated bulk modulus of Cr2AlC is higher at ambient temperature but decreases faster than the value of Ti2AlC as temperature increasing.