Dimethyldiallylammonium chloride acrylamide (DADMAC-AAM) copolymer was firstly applied as a novel corrosion inhibitor for carbon steel in acidic solution. Electrochemical, theoretical and computational methods were performed to illustrate the corrosion inhibition mechanism of DADMAC-AAM. Results of electrochemical tests indicated that DADMAC-AAM effectively slowed down corrosion rate of mild steel in HCl solution as a mixed-type corrosion inhibitor. Its corrosion inhibition efficiency increased with dosage, and the maximum value reached about 92.44 % with adding 100 mg/L. In-situ scanning vibration electrode technique illustrated that the corrosion inhibition performance of DADMAC-AAM increased with immersion time. Metal surface was covered with a dense hydrophobic film due to the physical-chemical adsorption of DADMAC-AAM molecules, and the adsorption behavior obeyed to the Langmuir adsorption isothermal model. Theoretical calculations were carried out to explain the corrosion inhibition mechanism, and the increase of active energy indicated that the strong inhibitive action of DADMAC-AAM molecule could be due to the increase of activation energy barrier of corrosion reaction. Results obtained from computational simulations proved that DMDMAC-AAM molecules adsorbed on metal surface through interactions between N or O and Fe atoms. This adsorption film could retard the invasion of corrosive species, thus protecting metal from corrosion.