Reverse osmosis desalination water plants have several operational issues such as corrosion in many areas like energy recovery devices that are accustomed to restore energy and scale back prices. Thus, there is a necessity to reduce the corrosion rate of the devices utilized in energy recovery. This study focuses on protection of some metals and alloys that are utilized in this industry by introducing a new anticorrosion coating. The new anticorrosion coating was formulated by the interaction of polyaniline and X-type zeolite that is employed as hosting material. Polyaniline was first formulated by conventional oxidation polymerization method of aniline in acidic medium at temperature below 5 °C by using ice bath. Then, ammonium persulphate was used as oxidizer. Numerous characterization techniques were used to demonstrate the encapsulation of polyaniline in X-type zeolite frames such as IR, UV-visible spectroscopy, scanning electron microscopy, transmission electron microscope, energy-dispersive X-ray and X-ray diffraction. The new anticorrosion coating was evaluated by using weight loss technique, Tafel polarization and electrochemical impedance spectroscopy; all of these techniques showed the effective anticorrosion properties of the prepared coating in which the corrosion rate from the polarization curves results, for all coated samples, was less than the bare ones as it recorded 2.403, 1.094, 23.48, 35.09 MPY for bare 304 and 316 stainless steel, Al and carbon steel, respectively, and 0.3132, 0.2733, 0.2506, 10.81 MPY for the coated samples. Corrosion results showed a noteworthy protection of the tested metals and alloys in saline water coated with the polyaniline/zeolite X.