The content of C element and in-situ Ti2AlC phase is adjusted to reduce the content of B2 phase in the TiAl matrix, ultimately improving the compressive properties of TiAl alloys. Results show that there is a high content of B2 phase inside the lamellar colony, and the Nb content in the B2 phase is higher than that dissolved in matrix. The addition of C element results in the formation of a round rod like reinforcing phase and refining the lamellar colony. As the C content increases from 0 to 3.0 at. %, the content of in-situ Ti2AlC reinforcing phase increases from 0 to 17.8 vol. %, the content of B2 phase decreases from 10.4 to 1.4 vol. %, and the size of the lamellar colony decreases from 161.3 to 19.5 μm. The decrease in the content of B2 phase is due to the preferential formation of Ti2AlC reinforcing phase in the liquid, Nb will preferentially dissolve in it, resulting in a more uniform distribution of Nb in the solidified structure and reducing the segregation of Nb. Then, Ti2AlC particles act as heterogeneous nucleation, increasing the nucleation sites in the alloy melt and refining the microstructure. According to the results of the compression test, as the C content increases from 0 to 2.5 at. %, the compressive strength increases from 1186.9 to 2154.5 MPa, and the compressive strain increases from 6.5 to 20.2 %. Therefore, the precipitation strengthening effect of Ti2AlC, the grain boundary strengthening effect of refined microstructure, and the decrease in the content of B2 phase jointly contribute to the improvement of the compressive properties at room temperature.