AbstractIn order to enhance the solubility of chitosan in water and its corrosion inhibition performance on Q235 steel in 1 M HCl solution, N‐vanillyl‐O‐2′‐hydroxypropyltrimethylammonium chloride chitosan (VHTC) was synthesized. The structure of VHTC was characterized by FT‐IR and 1H‐NMR spectroscopy. The corrosion inhibition performance of VHTC on Q235 steel in 1 M HCl solution was studied by weight loss, polarization, electrochemical impedance spectroscopy (EIS) and stereo microscope analysis. Experimental results indicate that VHTC shows better inhibition efficiency compared to chitosan. When the concentration of VHTC increases to 200 mg L−1, the inhibition efficiency reaches 90 %, which is almost equal to the conventional corrosion inhibitors (e.g., imidazoline). The polarization study demonstrates that VHTC is a mixed‐type inhibitor caused by a geometrical blanketing effect. The charge transfer resistance is proportional to the inhibitor concentration as revealed by the EIS results, indicating that the protective film on the Q235 steel surface is formed by adsorption of the inhibitor molecules. The inhibition efficiency of VHTC achieves the maximum value within 24 h when the concentration of VHTC is 200 mg L−1. The morphology observation of the corroded steel surface indicates that the corrosion of Q235 steel in 1 M HCl solution is significantly inhibited after introducing VHTC into the acidic solution.