Two types of corroded medium, acid and SRB, could be evaluate novel aziridinium, pyrrolium and azepanium quaternary ammonium salts as corrosion inhibitors at the concentration range of 500 - 100 ppm in 1M HCl. Quaternization of a series of heterocyclic amines with 4-nonyl phenol in the presence of aqueous sodium hydroxide under phase transfer conditions in chloroform as a solvent was performed (Scheme 1). Active ingredients of those inhibitors included long chain hydrocarbon heterocyclic amines were confirmed using FTIR, 1H NMR, and elemental analyses. The results, which include the corrosion and electrochemical testing data, showed that tested corrosion inhibitors In1 - In4 are effective in studied range of concentration and the corrosion effectiveness of tested quats increases toward In1- In3 with increase the number of member rings. The galvanostatic polarization curves showed that, the inhibitor behaves as mixed type. The observed corrosion data indicate that, the inhibition of carbon steel corrosion is due to the adsorption of the inhibitor molecules on the surface, which follow Langmuir adsorption isotherm. By fitting the obtained experimental data with Langmuir adsorption model, some thermodynamic and kinetic parameters such as adsorption free energy, Gads, equilibrium constant, Kads, were estimated. Apparently, the polar group makes it possible to lengthen the hydrophobic fragment of the inhibitor without significantly disturbing its hydrophilic–lipophilic balance and thus make the inhibitor not only more hydrophobic but also more soluble in water, which enhances its technological properties. For evaluation of SRB inhibition efficacy, microbial activity was monitored and cell counts were determined. All inhibitors were able to reduce microbial activity. The growth of the reference SRB (Desulfomonas pigra) was shown to be completely inhibited by In1- In3. In contrast, In4 had only a slight effect as being due to the presence of pyrrolium cation which may also be achieved due to decreasing the protective effect process. In this work, the thermodynamic parameters for adsorption and activation processes were determined; the following formulation properties are considered: the surface tension at cmc (?cmc), critical micelle concentration (cmc) of the surfactants in aqueous solutions, saturated adsorption amount of the surfactant (G8) and the minimum average area per surfactant molecule (Amin) at the air–water interface. On the bases of the result of small saturated adsorption amount and the large minimum average area per surfactant molecule, it is indicated that the minimum average area of surfactant decreases with the enhanced hydrophilic character of the molecule. A direct relationship has found between the corrosion efficacy (% IE) and G8.