In this work, we have applied the first-principles calculations to investigate the structural stability, elastic properties and electronic structure of Mo2FeB2 with alloying elements Cr, Ni and Mn. The calculated cohesive energy shows that Cr, Ni and Mn prefer to occupy the Fe atom of Mo2FeB2. However, only when Mn is doped at the Mo atom of Mo2FeB2, it is converted from dynamic unstable state to stable state. The calculated elastic modulus shows that Mo2FeB2 will have better mechanical properties when alloying elements are at Fe site instead of Mo site. Moreover, Cr addition can improve the volume deformation resistance of Mo2FeB2, Mn addition can improve the shear deformation resistance for Mo2FeB2. The calculated B/G ratio shows that Ni addition can improve the brittleness of borides. Furthermore, the hardness of Mo2FeB2 can be enhanced by adding Cr and Mn element. The calculated electronic structure indicates that the increasing of elastic modulus is attributed to the formation of Cr–B and Mn–B covalent bonds.