Grain boundary engineering (GBE) by appropriate deformation and heat treatment processes was applied to nickel-based alloy 825 due to its excellent corrosion resistance. The microstructure of nickel-based alloy was analyzed by electron backscatter diffraction (EBSD) and the effect of GBE on the corrosion resistance in high sulfur-containing environments was studied by electrochemical method. The results show that the ratio of low Σvalue coincidence site lattice (CSL) grain boundary is obviously improved from 47.1% to 65.5%. The special angle grain boundaries Σ3, Σ9, Σ27 and so on are randomly distributed on the network of the large angle grain boundaries, which destroy the connectivity of the original grain boundary network, and effectively block the corrosion cracking of the material along them. The corrosion resistance of nickel-based alloy 825 in high sulfur environments is enhanced verified by polarization curve and scanning electrochemical microscope, providing references for corrosion protection during the exploitation of high sulfur gas reservoirs.