Polymer corrosion inhibitors are reported to form dense films on carbon steel surfaces, and their thermostability enables survival in harsh downhole environments. In this paper, PEG-OTs was synthesized by mechanochemistry using ball mill by grafting tosyl on PEG. Using this solvent-free green chemistry, non-toxic PEG and PEG-OTs with various molecular weights (600, 2000, and 10,000 g/mol) were prepared and used as corrosion inhibitors. The corrosion inhibition performance of 5 × 10