The study of corrosion inhibition on mild steel (MS) in an acid medium (1 M HCl) solution was performed using a crude extract of Cocousnucifera gum (CNG). Cocousnucifera develops gum exudates on its palm, the exudate process occurs mainly after some physical or microbiological injuries and is formed on the fruit of the palm. The gum was utilized to study the corrosion inhibition of MS by electrochemical and surface studies. The characterization of the crude gum was done by Fourier transform infrared spectroscopy (FT-IR) which revealed the presence of several active components (aromatic and oxygen-containing functional groups) in its structure. The electrochemical studies resulted in the maximum inhibition efficiency value of 75.64 % at the highest inhibitor concentration of 4000 ppm at 308 K. It was inferred that both the anodic dissolution of the metal and cathodic hydrogen evolution were effectively decreased in the presence of Cocous nucifera gum extract, revealing that inhibitor is of mixed type. From the adsorption studies, it was found that the best fit with R2 ∼ 0.9 followed Langmuir adsorption isotherm indicating the monolayer adsorption of the inhibitor on the metal surface. Gibb’s free energy of adsorption values was found <−20 kJ/mol, a characteristic of predominant physical adsorption. To support the electrochemical data SEM (scanning electron microscopy), AFM (Atomic force microscopy), and X-ray diffraction analysis were performed and these are in good agreement.