AlCoCrFeNi high-entropy alloy was prepared by a vacuum arc melting furnace and annealed at 600, 800 and 1000 degrees C for 10 h. The microstructure of the alloys before and after annealing and their corrosion resistance in 3.5% NaCl solution, 0.5 mol/L NaOH solution and 0.5 mol/L H2SO4 solution were studied using XRD, SEM, EDS and electrochemical corrosion tests. The microstructure analysis shows that there are no complex intermetallic compounds in the as-cast and annealed states; the alloys in as-cast and 600 and 800 degrees C annealing states are composed of simple bcc crystal structure with dendritic structure. In 1000 degrees C annealing state, the dendritic structures disappear, the alloy consists of bcc+fcc, and the short rod-like fcc precipitate phase and bcc matrix arrange alternately; in the as-cast and three temperature annealing states, Co, Fe and Ni are uniformly distributed, and Cr, Al have a certain segregation; the Al segregation in the as-cast alloy is the most serious, and the Cr segregation in 800 degrees C annealing state is the most serious. Electrochemical corrosion tests show that the as-cast and three temperatures annealed AlCoCrFeNi alloys have excellent corrosion resistance in 3.5% NaCl solution and 0.5 mol/L NaOH solution. In 3.5% NaCl solution, the 1000 degrees C annealed alloy has the best corrosion resistance; in 0.5 mol/L NaOH solution, the alloys of the four states have similar corrosion resistance; in 0.5 mol/L H2SO4 solution, the alloys of the four states are passivated, and the 1000 degrees C annealed alloy has the minimum maintaining passivity current density and the highest break blunt potential, and its corrosion resistance is also the best.