In this work, the effect of heat treatment on the microstructure and mechanical properties of as-cast AlCoCrFeNi2.1 eutectic high entropy alloy (EHEA) at 600 ℃, 700 ℃, 800 ℃, 1000 ℃ and 1200 ℃ for 1 h, 2 h, 4 h, 10 h and 50 h are investigated. Under heat treatment at 600 ℃, 700 ℃ and 800 ℃, the FCC phase (CoCrFe phase) precipitates in the B2 phase, which improves the tensile strength (from 1007 MPa to 1173 MPa) and compression strength (from 1847 MPa to 2850 MPa), but declines the elongation (from 18.4% to 13.3%) and compression strain (from 43% to 39%). Meanwhile, the precipitate fraction increases with increasing temperature and the size of precipitated phase increases with increasing holding time at 600 ℃, 700 ℃ and 800 ℃. After holding at 1000 ℃ and 1200 ℃, the FCC phase dissolves in the B2 phase, which softens the alloy. The elongation (from 18.4% to 20.3%) and compression strain (from 43% to 49%) increase and the alloy still remains good tensile and compression strength. This work indicates the mechanisms of heat treatment on the microstructure and mechanical properties of the alloy.