Pyridinium derivatives namely, 4-(dimethylamino)-1-ethylpyridinium bromide (DEB), 4-(dimethylamino)-1-pentylpyridinium bromide (DPB) synthesised by our group, were tested as inhibitors for the corrosion of mild steel in 1 M HCl using polarisation and electrochemical impedance measurements, Scanning electron microscope (SEM) and Quantum chemical calculations. The results show that the DEB and DPB enhances inhibition at all concentrations. The best protection (94.09%) is obtained by adding DEB at 10-4 M. Polarisation curves show that DEB and DPB acts as a mixed type inhibitor. The degree of the surface coverage of the adsorbed inhibitors is determined by weight loss measurement, and it was found that the adsorption of the two compounds on the mild steel surface obeys the Langmuir adsorption isotherm. The effect of the temperature on the corrosion behaviour with addition of DEB and DPB at various concentrations was studied in the temperature range 303-333 K. Results show that the rate of corrosion of mild steel increased and protection efficiency decreased with increasing temperature. Kinetic parameters as well as thermodynamic parameters were calculated and discussed. Scanning electron microscopy (SEM) was applied to study the mild steel surface in the presence and absence of the two compounds. Quantum chemical calculations using DFT at the B3LYP/6-31G* level of theory was further used to calculate some electronic properties of the molecule in order to ascertain any correlation between the inhibitive effect and molecular structure of the DEB and DPB.