The corrosion inhibition properties of two compounds namely, 1,2-dibenzylidenehydrazine (C1) and 1,2-bis(1-phenylethylidene)hydrazine (C2) for mild steel (MS) in 1.0 M HCl were studied by using weight loss, electrochemical techniques, density functional theory (DFT), and molecular dynamic (MD) simulations. Experimental results show that both C1 and C2 behave as mixed-type inhibitors. Both inhibitors showed efficient binding with metal surface. With C1 exhibiting the highest inhibition efficiency, resulting in low double layer capacitance and a high polarization resistance. The mechanism of inhibition action of the studied compounds was discussed in the light of the DFT and MD simulations studies. MD simulation revealed a nearly flat configuration for the C1 molecule on the metal surface, with more negative interaction energy in comparison to C2. Theoretical results are in line with the experimental results. © 2018, The Minerals, Metals & Materials Society and ASM International.