A polyamine water treatment agent was prepared with the film-forming amine (N-oleyl-1,3-propylenediamine) and the neutralizing amine (cyclohexanamine) under optimal conditions. The copper sulfate liquid drop experiment showed that a protective film was formed by the polyamine water treatment agent on carbon steel. The analyses of the polarization curve and electrochemical impedance spectroscopy of carbon steel indicated that the polyamine water treatment agent exhibited geometric effects, which could inhibit both anode and cathode reactions of carbon steel, and the corrosion inhibition effect of the polyamine water treatment agent showed an extreme-concentration phenomenon. A metal corrosion experiment in a simulated boiler steam–water system indicated that the polyamine water treatment agent mitigated the corrosion of carbon steel at different temperatures, and the corrosion inhibition rates of the polyamine water treatment agent in liquid and gas environments at 150 °C were 53.84% and 67.43%, respectively, better than that at 350 °C. SEM-EDS characterization indicated that the formation of the corrosion product, iron oxide, on the carbon steel was reduced with the addition of the polyamine water treatment agent in the simulated boiler steam–water system.