Guar gum is a water-soluble, nonionic, nontoxic, biodegradable and biocompatible hetero polysaccharide with unlimited number of industrial applications. In this study, guar gum was evaluated as a natural inhibitor of carbon steel (CS) corrosion in 2 M H3PO4 solution. The characteristic effect of guar gum on the steel corrosion was studied at concentration ranges from 0.1 to 1.0 g/L at 298–328 K by weight loss and electrochemical methods. Obtained results showed that, the inhibition efficiency (η%) of guar gum decreased slightly when the temperature increased and increased by increasing the inhibitor concentration reaching the maximum value at 1.0 g/L. The adsorption of guar gum on steel surface was studied by the Temkin adsorption model. EIS measurements indicate that the values of the polarization resistance (Rp) of CS in presence of guar gum are significantly higher than that of the untreated surface. Steel surface coated with guar gum was analyzed by SEM, FTIR and XRD. The quantum calculations using DFT method and Molecular Dynamic (MD) simulations were performed to define the relationship between inhibition performance of investigated compound and their molecular structure. © 2017 Elsevier B.V.