In this research, developing a novel chitosan-Schiff base and its derivatives is a distinct and appealing synthetic route for green corrosion inhibitors to lower the rate of Cu-Ni alloy industrial corrosion. Cu-Ni alloy is a material of choice for condensers and heat exchangers, where seawater is used as a coolant and in desalination plants. Therefore, a novel chitosan-sodium pyruvate (Chi-SP) polymer was successfully prepared through the condensation reaction of chitosan with sodium pyruvate. (Chi-SP) polymer is tailored into the hydrophobic core of β-cyclodextrin (CD) by two routes (chemically and physically) to give a novel Chi-SP/β-CD inclusion complex (IC), Chi-SP/β-CD physical mixture (PM), respectively. Further, A composite of Chi-SP encapsulating titanium oxide (TiO2) with nanometer size has been synthesized by a one-pot reaction. The physicochemical properties and the corrosion inhibition efficiency (CIE) of Chi-SP, Chi-SP/β-CDIC, Chi-SP/β-CD PM, and Chi-SP/TiO2 were performed. The corrosion rate (CR) and inhibitor efficiency (IE) of Cu-Ni alloy in HCl (1 M) using Chi-SP, PM, IC, and the nanocomposite were found to be (82.53, 61.63, 65.56, and 62.94) % and (54.1, 65.7, 63.5, and 65)%, respectively. These findings reveal that the Chi-SP/TiO2 molecules have many polar hydroxyl groups which can contribute to the chemisorption and physisorption of the inhibitor on the alloy surface. As well as, the TiO2 in an aqueous solution convert into Ti4+ (cation ions) adsorbed on the negatively charged electrode surface, which increases the adsorption of the nanocomposite on the electrode surface and increases the protection layer.