Nickel-base alloy is a type of metal material with excellent properties and is widely used in many fields. However, in the harsh environment of the acid solution, corrosion causes the reduction of the service life of the alloys, thereby limiting the alloys' use and development. In this paper, the effect of Chromium (Cr) content on the microstructure and corrosion behavior of nickel-based alloys in hydrochloric acid (HCl) was studied by scanning electron microscopy (SEM), energy dispersive spectrum (EDS), electron backscatter diffraction (EBSD) and electrochemical workstation. Meanwhile, X-ray photoelectron spectroscopy (XPS) was used to investigate the composition and properties of the surface passive films. For the Cr20 and Cr30 alloys with a single face-centered cubic (FCC) structure, the Cr2O3 content in the passive films increased with the Cr content, effectively improving the corrosion resistance. As the Cr content continued to increase, the second phases having a body-centered cubic (BCC) lattice were precipitated both in the Cr40 and Cr50 samples, inducing microgalvanic corrosion, thus deteriorating the corrosion resistance. XPS results showed that, in the Cr30 alloy, the relative content of Cr2O3 and the bound water were the highest, indicating that its passive film had the best corrosion resistance. For the passive film, the pitting resistance was related to Cr content, appropriate Cr content improved the corrosion resistance.