The adsorption of organic corrosion inhibitor molecules on metal surfaces is similar to the complexation with metal ions. Rhodamine B acylhydrazone (RBA) with high complexation and selectivity for iron ion was used for fluorescence detection of steel corrosion. This paper confirmed that the strong coordination of RBA endowed it with excellent corrosion inhibition performance with the inhibition efficiency of over 99% and excellent durability. The increase in coverage and the positive shift in potential exhibited mutually reinforcing dynamic characteristics, which determined excellent corrosion inhibition. The corrosion inhibition of RBA on carbon steel was achieved through a combination of physical adsorption and chemical adsorption and the adsorption thermodynamics conformed to Langmuir adsorption. The active site was carbonyl O. RBA and further optimised rhodamine derivatives in molecular structure would become potential molecules for achieving a combination of corrosion detection and corrosion inhibition functions. In addition, the quantitative structure-activity equation constructed through composite quantum chemical parameters was in great agreement with the experimental results of corrosion inhibition efficiency.