The industrial and medical sectors have a great interest in chitosan due to its unique properties, such as abundance, renewability, non-toxicity, antibacterial activity, biodegradability, and polyfunctionality. In this work, two modified chitosan Schiff bases (ChSB-1 and ChSB-2) were made using condensation methods, and their potential as corrosion inhibitor for carbon steel in 1 M HCl was investigated using chemical and electrochemical techniques. The ChSB-1 and ChSB-2 inhibitors exhibited remarkable inhibitory performance, as evidenced by the mass loss data, which showed 89.3 % and 91.5 % efficacy at 1 mM concentration, respectively. Because of the electron-donor substituent of methoxy (–OCH3), ChSB-2's active sites have more delocalized electrons than ChSB-1's. The PDP results showed that both ChSB-1 and ChSB-2 inhibitors have anti-corrosion characteristics because heteroatoms caused a protective layer to develop that functioned as mixed-typed inhibitors. The calculated adsorption-free energy ∆Gadso for ChSB-1 and ChSB-2, respectively, was found −36.1 and − 37.1 kJ mol−1. The ChSB-1 and ChSB-2 inhibitors adsorb on carbon steel in acidic conditions through physisorption and chemisorption interactions, and their adsorption is in line with the Langmuir adsorption model. Inhibited and uninhibited metallic surfaces were subjected to surface morphological assessments using contact angle (CA), the scanning electron microscopy and the energy dispersive X-ray (SEM/EDX) analysis. The DMol3 part of Materials Studio 7.0 software was used to perform the quantum chemical calculations based on DFT to visualize the structural features. Studies from quantum chemistry suggest the possibility of surface interaction between the unoccupied orbitals of the metal surface and the inhibitors ChSB-1, ChSB-2, ChSB-1H+, and ChSB-2H+. The results clearly show that the two inhibitors work well as environmentally friendly carbon steel corrosion inhibitors in acidic medium. This could be advantageous for industrial procedures such as pickling, cleaning, acidizing oil drilling in oil wells, and using citrus to de-sediment boilers.