Adsorption of three polymeric ionic liquids, Corrosion performance and hydrogen evolution rate of carbon steel was tested in 1 mol L−1 HCl. The prepared polymers were based on 2-acrylamido-2-methylpropane sulfonic acid (AMPS) through quaternization with different tertiary amines such as triethanolamine, triethylamine and trimethylamine. The chemical structures of the prepared polymers are characterized by FTIR, 1H NMR, 13C NMR and elemental analyses. Hydrogen evolution rate (HER), potentiodynamic polarization (PDP) and electrochemical impedance spectroscopy (EIS) were investigated. After the corrosion tests, the morphology of the metal after immersion in inhibitor were considered by scan electron microscope (SEM). The addition of the prepared inhibitors lead to a resistance in the corrosion process in all cases by delaying the rate of hydrogen generation and reduction in the corrosion rate of carbon steel. In addition, a rise in the inhibition efficiency (IE) was occurred with developing inhibitors concentration. However, the order of inhibitors efficiency is poly-2-acrylamido-2-methylpropane sulfonic acid triethanolamine derivative (P1) > poly-2-acrylamido-2-methylpropane sulfonic acid triethylamine derivative (P2) > poly-2-acrylamido-2-methylpropane sulfonic acid trimethylamine derivative (P3). This inhibition occurred by the adsorbed film created by inhibitor on the steel surface that defend the metal against corrosive procedures.