Abstract Flue gas collection from steam generators and its utilization in enhanced oil recovery (EOR) can reduce CO2 emissions into the atmosphere and improve oil recovery efficiency. Under the environments of flue gas corrosion in oilfields, the effects of corrosion time, temperature, pressure, velocity, and concentrations of O2, SO2, H2O, and NaCl on corrosion rates of steels used for a downhole string were investigated through physical simulation experiments. The corrosion mechanisms were analyzed by component, and the morphology of the corrosion products tested by X‐ray diffraction (XRD) and scanning electron microscopy (SEM). In the gas phase, the corrosion rates of X70, P110, and N80 notably increase with temperature and O2 concentration. The corrosion rates first increase rapidly with pressure from 1.0 to 3.0 MPa and then remain largely stable. Meanwhile, the corrosion rates of X70, P110, and N80 in the liquid phase first increase and then decrease with temperature and reach maximum values at 90°C. The corrosion rates of X70, P110, and N80 increase notably with velocity and the concentrations of O2, SO2, H2O, and NaCl. The corrosion rate of 13Cr is considerably lower than those of N80, P110, and X70, which shows good corrosion resistance performance. To reduce the flue gas corrosion of a downhole string, the relative humidity of the flue gas should be lower than 0.7, the temperature of the flue gas in the wellbore should avoid the range between 80 and 100°C, the excess air coefficient of the boiler should be kept at a reasonable value to reduce the O2 content in the flue gas, and the flue gas should not be coinjected into wellbores with brine. The injection of flue gas is technically feasible considering the corrosion of downhole string.