In this paper, the inhibition efficiency of Quaternary Polyethyleneimine (QPEI) self-adsorbed films was studied by polarization curve and weight loss method. We made an intensive study of its anticorrosion mechanism for low carbon steel in different acid baths using Polyethyleneimine(PEI) and QPEI as inhibitor, respectively. Diatomite particles were surface-modified with PEI and QPEI, respectively, and their zeta potentials were measured. The morphologies and compositions of the polymer film on the steel surface were examined with the aids of SEM and XPS, respectively. Compared with PEI, the cationic property is stronger, and it is not influenced by the PH value of mediums. The zeta potential of diatomite particles surface-modified with QPEI remains higher positive in whole PH range. The above facts enough confirm that anticorrosion mechanism of QPEI for low carbon steel attributes to its possessing outstanding cationic property.