Abstract In this investigation, a novel class of poly(urethane-semicarbazides) containing thiadiazoles on the backbone of the polymers (SR-16 and SR-17) was synthesized and characterized by different spectroscopic methods (FTIR, 1H NMR, and 13C NMR). The inhibition action of the synthesized polymers on steel pipelines in carbon dioxide-containing oilfield formation water has been studied using electrochemical measurements namely, electrochemical impedance spectroscopy (EIS), potentiodynamic polarization (PDP), and surface morphology tools such as energy-dispersive spectroscopy (EDX) and a field emission-scanning electron microscopy (FE-SEM). The findings indicate that the fabricated polymers SR-16 and SR-17 exhibits superior corrosion performance on steel in oilfield formation water saturated with CO2. The protection capacity is found to increase by increasing the polymer concentration up to maximum values 92.12 and 96.52% for 150 ppm at 50 °C in the presence of SR-16 and SR-17, respectively. The FE-SEM and EDX measurements indicate that the steel surface is protected by studied polymers. The current study provides very significative data in fabricating and designing novel polymer inhibitors with high protection efficiency.