The anisotropic elastic, thermal properties and electronic structures of ternary layered transition metal borides M2AlB2 (where M = Fe, Cr, and Mn) were analysed using first-principles calculations and the Debye quasi-harmonic approximation. There was a good agreement between our calculated lattice constants and previous experimental and theoretical results. Our calculated thermodynamic stability parameters demonstrated that these borides had stable structures. Mn2AlB2 was the most incompressible material, while Cr2AlB2 was more rigid and a transversely resistant deformed material. The anisotropy of elasticity of the compounds was also estimated. They had different anisotropic elastic properties. The chemical bonding of the compounds primarily involved mixed covalent-metallic interactions. Covalent bonds were present between the boron and metal atoms. The M-M and B-B bond lengths were the longest and shortest in these compounds, respectively, and the bond strength in Fe2AlB2 was stronger. The anisotropic linear thermal expansion coefficients of these materials were also calculated. The thermal expansion in the  direction was the largest relative to the other two directions.