A triphenylphosphonium based ionic liquid containing a long hydrophobic alkyl-chain (designated as DTPPB) was evaluated as a potential corrosion inhibitor for mild steel (MS) in 0.5 M H2SO4 solution. Inhibition efficiency and adsorption behavior of DTPPB was determined by performing the experimental analyses were carried out at the different concentration and temperature. Corrosion inhibition effectiveness of DTPPB was determined experimentally using electrochemical and surface analyses (SEM-EDX and AFM). Polarization studies showed that DTPPB acted as a mixed-type inhibitor. Inhibition effectiveness of DTPPB increases with increasing its concentration. The potentiostatic polarization study revealed that passivation was perceived at lower DTPPB concentrations. The Nyquist plot of impedance is expressed mainly as a depressed capacitive loop with different concentrations. Self-organization of the chains and tail groups to form a coherent hydrophobic film that serves as a barrier for the transport of water, oxygen, and corrosive ions to the metal surface. In addition to the electrochemical studies, surface morphology analyses provided strong evidence for the existence of inhibitor film over the MS surface and their results were supported by the computational data. (C) 2021 Published by Elsevier B.V.