Linagliptin (LGP) was investigated as a mild steel (MS) corrosion inhibitor in 1 M HCl solution using combined experimental and theoretical explorations. The investigated molecule was revealed to reduce the corrosion of mild steel in an extremely acidic environment. LGP inhibitory effectiveness is temperature and inhibitor concentration dependent, reducing with rising temperature and increasing with increased LGP concentration. The maximum inhibition efficiencies deduced by weight loss, impedance and potentiodynamic measurements with 7.5 × 10−3 M LGP at 30 °C were 96.3%, 96% and 94%, respectively. The results of polarization measurement suggested a mixed-type inhibitory action of LGP, reducing the anodic/cathodic partial reaction. Adsorption of LGP onto the steel surface obeyed Langmuir isotherm, with a combination of chemical and physical adsorption. Scanning electron microscopy (SEM) and atomic force microscopy (AFM) revealed the adsorbed inhibitor film layer shielding the mild steel from hostile acid ions. DFT/MD simulation approaches were used to investigate the adsorption orientation of LGP's molecule on the mild steel surface in aqueous environment. The experimental routes strongly conform with the theoretical findings.